/* ACM Public Styles */
:root {
    --acm-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --acm-primary: #000000;
    --acm-primary-hover: #333333;
    --acm-bg: #ffffff;
    --acm-text: #000000;
    --acm-text-secondary: #666666;
    --acm-border: #e0e0e0;
    --acm-overlay: rgba(0, 0, 0, 0.6);
}

/* Base Reset within container */
#acm-banner-wrapper,
#acm-preferences-modal {
    box-sizing: border-box;
}

#acm-banner-wrapper *,
#acm-preferences-modal * {
    box-sizing: border-box;
}

/* Banner */
#acm-banner-wrapper {
    position: fixed;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 999999;
    background-color: var(--acm-bg);
    color: var(--acm-text);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    font-family: var(--acm-font-family);
    border-top: 1px solid var(--acm-border);
}

.acm-position-bottom {
    bottom: 0;
}

.acm-position-top {
    top: 0;
    border-bottom: 1px solid var(--acm-border);
    border-top: none;
}

.acm-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.acm-banner-content {
    flex: 1;
}

.acm-banner-content h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--acm-text);
}

.acm-banner-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--acm-text-secondary);
}

.acm-banner-content a {
    color: var(--acm-text);
    text-decoration: underline;
}

.acm-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

/* Buttons */
.acm-button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    /* Slightly rounded */
    transition: all 0.2s ease;
    font-family: var(--acm-font-family);
    line-height: 1.2;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.acm-button-primary {
    background-color: var(--acm-primary);
    color: #ffffff;
    border: 1px solid var(--acm-primary);
}

.acm-button-primary:hover {
    background-color: var(--acm-primary-hover);
    border-color: var(--acm-primary-hover);
}

.acm-button-outline {
    background-color: transparent;
    color: var(--acm-text);
    border: 1px solid var(--acm-text);
}

.acm-button-outline:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.acm-button-text {
    background-color: transparent;
    color: var(--acm-text);
    border: none;
    padding: 10px;
}

.acm-button-text .dashicons {
    margin-right: 5px;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.acm-button-text:hover {
    text-decoration: underline;
}

.acm-full-width {
    width: 100%;
}

/* Modal */
.acm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--acm-font-family);
}

.acm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--acm-overlay);
    backdrop-filter: blur(2px);
}

.acm-modal-container {
    background: #ffffff;
    width: 800px;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 0;
    /* Sharp edges for premium feel */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
}

.acm-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--acm-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acm-modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.acm-close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--acm-text-secondary);
    padding: 0;
    line-height: 1;
}

.acm-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.acm-intro-text {
    background-color: #f9f9f9;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--acm-text-secondary);
}

.acm-intro-text p {
    margin: 0;
}

.acm-tabs-container {}

.acm-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--acm-border);
    margin-bottom: 24px;
}

.acm-tab-btn {
    padding: 12px 0;
    margin-right: 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 700;
    color: var(--acm-text-secondary);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.acm-tab-btn.active {
    color: var(--acm-primary);
    border-bottom-color: var(--acm-primary);
}

.acm-category-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.acm-category-row:last-child {
    border-bottom: none;
}

.acm-category-info h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 700;
}

.acm-category-info p {
    margin: 0;
    font-size: 13px;
    color: var(--acm-text-secondary);
    max-width: 500px;
}

.acm-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--acm-text-secondary);
    border: 1px solid #ddd;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 8px;
    text-transform: uppercase;
}

/* Switch Toggle */
.acm-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.acm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.acm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.acm-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.acm-slider {
    background-color: var(--acm-primary);
}

input:focus+.acm-slider {
    box-shadow: 0 0 1px var(--acm-primary);
}

input:checked+.acm-slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

input:disabled+.acm-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Rounded sliders */
.acm-slider.round {
    border-radius: 24px;
}

.acm-slider.round:before {
    border-radius: 50%;
}

.acm-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--acm-border);
    background-color: #f9f9f9;
}

/* Responsive */
@media (max-width: 768px) {
    .acm-banner-container {
        flex-direction: column;
        gap: 20px;
    }

    .acm-banner-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .acm-button {
        flex: 1;
        text-align: center;
    }

    #acm-preferences-btn {
        order: 1;
        width: 100%;
    }

    #acm-reject-all {
        order: 2;
    }

    #acm-accept-all {
        order: 3;
        border-radius: 50%;
        background-color: var(--acm-bg, #ffffff);
        color: var(--acm-text, #000000);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        z-index: 999990;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
        border: 1px solid var(--acm-border, #e0e0e0);
    }

    #acm-floating-badge:hover {
        transform: scale(1.1);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    #acm-floating-badge .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Ensure shortcode link looks clickable */
    .acm-manage-cookies-link {
        cursor: pointer;
        text-decoration: underline;
    }