/* =============================================
   COOKIE CONSENT & PRIVACY PREFERENCES STYLING
   Circle Innovation Blue Glassmorphism Theme
   ============================================= */

/* Floating Cookie Banner */
.cookie-banner-wrap {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    left: 1.5rem;
    max-width: 520px;
    margin-left: auto;
    z-index: 9990;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.cookie-banner-wrap[hidden] {
    display: none !important;
}

.cookie-banner-inner {
    background: rgba(2, 43, 84, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(78, 160, 230, 0.35);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(1, 22, 46, 0.65), 0 0 30px rgba(23, 109, 185, 0.25);
    color: #f8fafc;
}

.cookie-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-blue-400, #4ea0e6);
    background: rgba(23, 109, 185, 0.22);
    border: 1px solid rgba(78, 160, 230, 0.3);
    padding: 0.35rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.cookie-banner-text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 1.25rem;
}

.cookie-banner-text a {
    color: var(--color-blue-400, #4ea0e6);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner-text a:hover {
    color: #93c5fd;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

/* Base Cookie Buttons */
.cookie-btn {
    font-family: inherit;
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cookie-btn-primary {
    background: var(--color-blue-600, #176db9);
    color: #ffffff;
    border-color: rgba(78, 160, 230, 0.4);
}

.cookie-btn-primary:hover {
    background: var(--color-blue-500, #2d7cbe);
    box-shadow: 0 4px 18px rgba(23, 109, 185, 0.45);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}

.cookie-btn-text {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.cookie-btn-text:hover {
    color: var(--color-blue-400, #4ea0e6);
    text-decoration: underline;
}

/* Cookie Modal Dialog */
.cookie-modal-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cookie-modal-wrap[hidden] {
    display: none !important;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 22, 46, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cookie-modal-box {
    position: relative;
    z-index: 2;
    background: #01162e;
    border: 1px solid rgba(78, 160, 230, 0.35);
    border-radius: 20px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(23, 109, 185, 0.25);
    overflow: hidden;
    color: #e2e8f0;
}

.cookie-modal-header {
    padding: 1.5rem 1.75rem;
    background: rgba(2, 43, 84, 0.5);
    border-bottom: 1px solid rgba(78, 160, 230, 0.2);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.cookie-modal-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-blue-400, #4ea0e6);
}

.cookie-modal-header h3 {
    margin: 0.35rem 0 0;
    font-size: 1.35rem;
    font-family: var(--font-sans, 'Montserrat', sans-serif);
    color: #ffffff;
    font-weight: 600;
}

.cookie-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.5rem;
    line-height: 1;
    width: 36px;
    height: 36px;
    padding: 0;
    flex-shrink: 0;
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.cookie-modal-body {
    padding: 1.75rem;
    overflow-y: auto;
    flex: 1;
    background: linear-gradient(180deg, #01162e 0%, #022b54 100%);
}

.cookie-modal-intro {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1.5rem;
}

.cookie-category-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cookie-category-item {
    background: rgba(2, 43, 84, 0.45);
    border: 1px solid rgba(78, 160, 230, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cookie-cat-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
}

.cookie-badge-required {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(23, 109, 185, 0.25);
    color: var(--color-blue-400, #4ea0e6);
    border: 1px solid rgba(78, 160, 230, 0.3);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    margin-left: 0.6rem;
}

.cookie-cat-desc {
    font-size: 0.825rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
}

/* Custom Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--color-blue-600, #176db9);
}

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

.cookie-modal-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid rgba(78, 160, 230, 0.2);
    background: rgba(1, 22, 46, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-footer-note a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: underline;
}

.cookie-footer-note a:hover {
    color: var(--color-blue-400, #4ea0e6);
}

.cookie-modal-btns {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .cookie-banner-wrap {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .cookie-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-modal-btns {
        flex-direction: column;
    }
    .cookie-modal-btns .cookie-btn {
        width: 100%;
    }
}
