/* ===========================
   Cookie Compliance Banner CSS
   Built by Rudra Innovative Software
   www.rudrainnovative.com
   =========================== */

/* Reset */
.cc-banner-wrapper,
.cc-banner-wrapper *,
.cc-modal,
.cc-modal * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ---- Banner ---- */
.cc-banner-wrapper {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 0;
    animation: ccSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-position-bottom { bottom: 0; }
.cc-position-top { top: 0; }

.cc-position-bottom-left,
.cc-position-bottom-right {
    bottom: 20px;
    left: auto;
    right: auto;
    max-width: 440px;
}
.cc-position-bottom-left { left: 20px; right: auto; }
.cc-position-bottom-right { right: 20px; left: auto; }

@keyframes ccSlideIn {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cc-position-top {
    animation-name: ccSlideInTop;
}
@keyframes ccSlideInTop {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cc-banner-inner {
    background: var(--cc-bg, #ffffff);
    color: var(--cc-text, #1e293b);
    padding: 12px 28px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08), 0 -1px 6px rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cc-layout-bar .cc-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cc-layout-box .cc-banner-inner {
    border-radius: 16px;
    border-top: none;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cc-banner-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 3px;
    color: var(--cc-text, #1e293b);
    letter-spacing: -0.01em;
}

.cc-banner-message {
    font-size: 13px;
    line-height: 1.5;
    color: var(--cc-text, #1e293b);
    opacity: 0.75;
    max-width: 680px;
}

.cc-privacy-link {
    color: var(--cc-primary, #2563eb);
    text-decoration: none;
    font-weight: 500;
    margin-left: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.cc-privacy-link:hover {
    border-bottom-color: var(--cc-primary, #2563eb);
}

.cc-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}

/* ---- Branding ---- */
.cc-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0 0;
    width: 100%;
    font-size: 11px;
    color: var(--cc-text, #1e293b);
    opacity: 0.32;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
}
.cc-branding:hover {
    opacity: 0.6;
}
.cc-branding a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    margin-left: 3px;
    border-bottom: 1px dotted currentColor;
}
.cc-branding a:hover {
    opacity: 1;
    border-bottom-style: solid;
}

.cc-layout-bar .cc-branding {
    padding: 3px 0 0;
    justify-content: flex-end;
}


/* ============================================
   BUTTONS — Polished modern pill-style
   !important used to override theme/page-builder
   resets (Elementor Kit, Divi, etc.)
   ============================================ */
.cc-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 9px 22px !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    border-style: solid !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    letter-spacing: 0.01em !important;
    position: relative !important;
    overflow: hidden !important;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none !important;
    text-transform: none !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    min-width: auto !important;
}

.cc-btn:focus-visible {
    outline: 3px solid var(--cc-primary, #2563eb) !important;
    outline-offset: 3px !important;
}

.cc-btn:active {
    transform: scale(0.96) !important;
}

/* Accept All — Bold filled primary with glow */
.cc-btn-accept-all {
    background: var(--cc-primary, #2563eb) !important;
    color: #ffffff !important;
    border-color: var(--cc-primary, #2563eb) !important;
    border-style: solid !important;
    box-shadow:
        0 2px 8px rgba(37, 99, 235, 0.35),
        0 1px 2px rgba(37, 99, 235, 0.2) !important;
}
.cc-btn-accept-all:hover,
.cc-btn-accept-all:focus {
    background: var(--cc-primary-hover, #1d4ed8) !important;
    color: #ffffff !important;
    border-color: var(--cc-primary-hover, #1d4ed8) !important;
    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.4),
        0 2px 6px rgba(37, 99, 235, 0.2) !important;
    transform: translateY(-2px) !important;
}
.cc-btn-accept-all:active {
    transform: translateY(0) scale(0.97) !important;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25) !important;
}

/* Reject All — Subtle outlined */
.cc-btn-reject-all {
    background: transparent !important;
    color: var(--cc-text, #1e293b) !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
    border-style: solid !important;
    box-shadow: none !important;
}
.cc-btn-reject-all:hover,
.cc-btn-reject-all:focus {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--cc-text, #1e293b) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
.cc-btn-reject-all:active {
    background: rgba(0, 0, 0, 0.06) !important;
    transform: translateY(0) scale(0.97) !important;
}

/* Customize / Preferences — Outlined primary accent */
.cc-btn-preferences {
    background: transparent !important;
    color: var(--cc-primary, #2563eb) !important;
    border-color: var(--cc-primary, #2563eb) !important;
    border-style: solid !important;
    box-shadow: none !important;
}
.cc-btn-preferences:hover,
.cc-btn-preferences:focus {
    background: var(--cc-primary, #2563eb) !important;
    color: #ffffff !important;
    border-color: var(--cc-primary, #2563eb) !important;
    box-shadow:
        0 4px 14px rgba(37, 99, 235, 0.3),
        0 1px 3px rgba(37, 99, 235, 0.15) !important;
    transform: translateY(-2px) !important;
}
.cc-btn-preferences:active {
    transform: translateY(0) scale(0.97) !important;
}

/* Save Preferences — Primary filled */
.cc-btn-save {
    background: var(--cc-primary, #2563eb) !important;
    color: #ffffff !important;
    border-color: var(--cc-primary, #2563eb) !important;
    border-style: solid !important;
    box-shadow:
        0 2px 8px rgba(37, 99, 235, 0.35),
        0 1px 2px rgba(37, 99, 235, 0.2) !important;
}
.cc-btn-save:hover,
.cc-btn-save:focus {
    background: var(--cc-primary-hover, #1d4ed8) !important;
    color: #ffffff !important;
    border-color: var(--cc-primary-hover, #1d4ed8) !important;
    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.4),
        0 2px 6px rgba(37, 99, 235, 0.2) !important;
    transform: translateY(-2px) !important;
}
.cc-btn-save:active {
    transform: translateY(0) scale(0.97) !important;
}


/* ---- Modal ---- */
.cc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cc-modal-dialog {
    position: relative;
    background: var(--cc-bg, #ffffff);
    color: var(--cc-text, #1e293b);
    border-radius: 20px;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.08);
    animation: ccModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ccModalIn {
    from { transform: scale(0.92) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cc-modal-header h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.cc-modal-close {
    background: rgba(0, 0, 0, 0.04) !important;
    border: none !important;
    border-style: none !important;
    font-size: 20px !important;
    cursor: pointer !important;
    color: var(--cc-text, #1e293b) !important;
    opacity: 0.5;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    line-height: 1 !important;
    transition: all 0.2s;
}
.cc-modal-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08) !important;
}

.cc-modal-body {
    padding: 22px 28px;
    overflow-y: auto;
    flex: 1;
}

.cc-modal-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.7;
}

.cc-category {
    border: 1.5px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.01);
}

.cc-category:hover {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.015);
}

.cc-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cc-category-title {
    font-size: 15px;
    font-weight: 700;
}

.cc-always-active {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #15803d;
    background: #dcfce7;
    padding: 3px 10px;
    border-radius: 50px;
    margin-left: 8px;
}

.cc-category-desc {
    font-size: 13px;
    line-height: 1.55;
    margin-top: 10px;
    opacity: 0.6;
}

/* ---- Toggle Switch ---- */
.cc-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 28px;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-toggle-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.cc-toggle input:checked + .cc-toggle-slider {
    background: var(--cc-primary, #2563eb);
}

.cc-toggle input:checked + .cc-toggle-slider::before {
    transform: translateX(20px);
}

.cc-toggle-disabled {
    background: #22c55e !important;
    cursor: not-allowed;
}

.cc-toggle-disabled::before {
    transform: translateX(20px);
}

.cc-modal-footer {
    display: flex;
    gap: 10px;
    padding: 18px 28px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.cc-modal-footer .cc-btn {
    flex: 1;
    min-width: 120px;
}

/* Branding in modal */
.cc-modal-branding {
    text-align: center;
    padding: 10px 28px 16px;
    font-size: 11px;
    color: var(--cc-text, #1e293b);
    opacity: 0.3;
    letter-spacing: 0.02em;
}
.cc-modal-branding a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dotted currentColor;
}
.cc-modal-branding a:hover {
    opacity: 1;
    border-bottom-style: solid;
}


/* ---- Dark Theme ---- */
.cc-theme-dark .cc-banner-inner,
.cc-theme-dark .cc-modal-dialog {
    background: #0f172a;
    color: #e2e8f0;
    border-top-color: rgba(255, 255, 255, 0.05);
}

.cc-theme-dark .cc-banner-title,
.cc-theme-dark .cc-banner-message,
.cc-theme-dark .cc-modal-header h2 {
    color: #f1f5f9;
}

.cc-theme-dark .cc-btn-reject-all {
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.cc-theme-dark .cc-btn-reject-all:hover,
.cc-theme-dark .cc-btn-reject-all:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.cc-theme-dark .cc-modal-close {
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.06) !important;
}
.cc-theme-dark .cc-modal-close:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.cc-theme-dark .cc-category {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.cc-theme-dark .cc-category:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.cc-theme-dark .cc-modal-header,
.cc-theme-dark .cc-modal-footer {
    border-color: rgba(255, 255, 255, 0.06);
}

.cc-theme-dark .cc-toggle-slider {
    background: #475569;
}

.cc-theme-dark .cc-branding,
.cc-theme-dark .cc-modal-branding {
    color: #e2e8f0;
}


/* ---- Cookie Declaration (shortcode) ---- */
.cc-cookie-declaration h2 {
    margin-bottom: 10px;
}

.cc-declaration-category {
    margin-bottom: 24px;
}

.cc-declaration-category h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.cc-required-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #15803d;
    background: #dcfce7;
    padding: 3px 10px;
    border-radius: 50px;
    margin-left: 8px;
    vertical-align: middle;
}

.cc-cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.cc-cookie-table th,
.cc-cookie-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.cc-cookie-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cc-no-cookies {
    font-style: italic;
    opacity: 0.5;
}

/* ---- Open Preferences Button (shortcode) ---- */
.cc-open-preferences {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 22px !important;
    border: 2px solid var(--cc-primary, #2563eb) !important;
    border-style: solid !important;
    border-radius: 50px !important;
    background: transparent !important;
    color: var(--cc-primary, #2563eb) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.cc-open-preferences:hover {
    background: var(--cc-primary, #2563eb) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
    transform: translateY(-1px) !important;
}


/* ---- Responsive ---- */
@media (max-width: 768px) {
    .cc-banner-inner {
        padding: 10px 16px;
    }

    .cc-layout-bar .cc-banner-inner {
        flex-direction: column;
        text-align: center;
    }

    .cc-banner-actions {
        justify-content: center;
        width: 100%;
    }

    .cc-banner-actions .cc-btn {
        flex: 1;
        min-width: 0 !important;
        padding: 8px 14px !important;
        font-size: 12px !important;
    }

    .cc-branding {
        justify-content: center;
    }

    .cc-modal-dialog {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }

    .cc-modal-footer {
        flex-direction: column;
    }

    .cc-modal-footer .cc-btn {
        min-width: unset;
    }

    .cc-position-bottom-left,
    .cc-position-bottom-right {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}
