/* Cookie consent base styles.
   This file is now the source of truth for cookie consent presentation. */

.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: transform 0.25s ease, opacity 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem;
}

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

.cookie-consent-header h3 {
    margin: 0;
    color: #003da5;
    font-size: 1.125rem;
    font-weight: 600;
}

.cookie-consent-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.cookie-consent-close:hover {
    background-color: #f3f4f6;
}

.cookie-consent-description {
    margin-bottom: 1rem;
    color: #374151;
    line-height: 1.5;
}

.cookie-consent-options {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-options-header {
    margin-bottom: 0.5rem;
}

.cookie-options-toggle {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #374151;
}

.cookie-options-toggle:hover {
    border-color: #003da5;
    background: #f1f5f9;
}

.cookie-option {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
}

.cookie-option:hover {
    border-color: #003da5;
}

.cookie-option-label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    cursor: pointer;
    align-items: start;
}

.cookie-option-label input[type="checkbox"] {
    margin-top: 2px;
}

.cookie-option-name {
    font-weight: 500;
    color: #111827;
    grid-column: 2;
}

.cookie-option-desc {
    font-size: 0.875rem;
    color: #6b7280;
    grid-column: 2;
    margin-top: 0.2rem;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
}

.cookie-consent-actions .btn {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.cookie-consent-actions .btn-primary {
    background-color: #003da5;
    color: #fff;
}

.cookie-consent-actions .btn-primary:hover {
    background-color: #0f172a;
}

.cookie-consent-actions .btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.cookie-consent-actions .btn-secondary:hover {
    background-color: #e5e7eb;
}

.cookie-consent-actions .btn-outline {
    background-color: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.cookie-consent-actions .btn-outline:hover {
    background-color: #f8fafc;
    color: #374151;
}

.cookie-consent-links {
    text-align: center;
    font-size: 0.875rem;
}

.cookie-consent-links a {
    color: #003da5;
    text-decoration: none;
}

.cookie-consent-links a:hover {
    text-decoration: underline;
}

.cookie-consent-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #003da5;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0;
}

.cookie-settings-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-settings-btn {
    background: #003da5;
    color: #fff;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.cookie-settings-btn:hover {
    background: #0f172a;
    transform: translateY(-1px);
}

.cookie-settings-dismiss {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-dismiss:hover {
    background: rgba(0, 0, 0, 0.8);
}

.cookie-consent-minimize {
    display: none;
}

@media (max-width: 768px) {
    .cookie-consent-banner {
        max-height: min(28vh, 190px);
        border-radius: 16px 16px 0 0;
    }

    .cookie-consent-content {
        padding: 0.55rem 0.7rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    }

    .cookie-consent-header {
        margin-bottom: 0.45rem;
    }

    .cookie-consent-header h3 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .cookie-consent-description,
    .cookie-consent-options,
    .cookie-consent-links {
        display: none;
    }

    .cookie-consent-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        margin: 0;
    }

    .cookie-consent-actions .btn {
        width: 100%;
        text-align: center;
        min-height: 38px;
        padding: 0.55rem 0.5rem;
        font-size: 0.82rem;
    }

    .cookie-consent-actions .btn-outline {
        grid-column: 1 / -1;
    }

    .cookie-settings-container {
        bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        right: 0.5rem;
        max-width: calc(100vw - 88px);
        gap: 0.35rem;
    }

    .cookie-settings-btn {
        max-width: min(58vw, 220px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cookie-settings-btn,
    .cookie-settings-dismiss {
        min-width: 44px;
        min-height: 44px;
    }

    .cookie-settings-dismiss {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        max-height: min(25vh, 170px);
    }

    .cookie-consent-actions .btn-secondary {
        display: none;
    }

    .cookie-consent-actions .btn-outline {
        grid-column: auto;
    }
}

/* Mobile compatibility variants merged from legacy cookie-banner-mobile.css. */
@media (max-width: 640px) {
    .cookie-consent-banner.mobile {
        cursor: grab;
        touch-action: pan-y;
        user-select: none;
        -webkit-user-select: none;
    }

    .cookie-consent-banner.mobile:active {
        cursor: grabbing;
    }

    .cookie-consent-banner.minimal {
        padding: 0;
        background: rgba(255, 255, 255, 0.98);
        max-height: 60px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .cookie-consent-banner.minimal::before {
        content: "🍪";
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2rem;
    }

    .cookie-consent-banner.minimal .cookie-consent-content {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0.5rem 1rem 0.5rem 3rem;
        height: 60px;
    }

    .cookie-consent-banner.minimal .cookie-consent-header,
    .cookie-consent-banner.minimal .cookie-consent-description,
    .cookie-consent-banner.minimal .cookie-consent-options,
    .cookie-consent-banner.minimal .cookie-consent-links {
        display: none;
    }

    .cookie-consent-banner.minimal .cookie-consent-actions {
        display: flex;
        gap: 0.5rem;
        margin: 0;
    }

    .cookie-consent-banner.minimal .cookie-consent-actions .btn {
        padding: 0.4rem 0.8rem;
        min-height: 32px;
        font-size: 0.75rem;
        border-radius: 16px;
    }

    .cookie-consent-banner.minimal .cookie-consent-actions .btn-secondary {
        display: none;
    }
}
