/**
 * Cookie Consent Styles
 */

/* Body lock when modal is open */
body.cookie-modal-open {
    overflow: hidden;
}

/* Cookie Modal Overlay */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal-overlay.show {
    opacity: 1;
}

/* Cookie Modal */
.cookie-modal {
    background: var(--cookie-bg, #ffffff);
    color: var(--cookie-text, #1e293b);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.cookie-modal-overlay.show .cookie-modal {
    transform: translateY(0) scale(1);
}

.cookie-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-intro {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Cookie Category */
.cookie-category {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.cookie-category:last-of-type {
    margin-bottom: 0;
}

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

.cookie-category-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.cookie-always-on {
    font-size: 0.8rem;
    color: #475569;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.cookie-category-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
}

/* Cookie Toggle */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--cookie-primary, #31a3dd);
}

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

/* Cookie Modal Footer */
.cookie-modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.cookie-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, opacity 0.2s;
    border: none;
    text-align: center;
}

.cookie-btn-outline {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: inherit;
}

.cookie-btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cookie-btn-secondary {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
}

.cookie-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.15);
}

.cookie-btn-primary {
    background: #0e7490 !important;
    color: white;
}

.cookie-btn-primary:hover {
    filter: brightness(1.1);
}

.cookie-privacy-link {
    display: block;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.7;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.cookie-privacy-link:hover {
    opacity: 1;
}

/* Fingerprint Button */
.cookie-fingerprint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cookie-primary, #0e7490);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
    opacity: 0;
    transform: scale(0.8);
}

.cookie-fingerprint.show {
    opacity: 1;
    transform: scale(1);
}

.cookie-fingerprint:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cookie-fingerprint svg {
    width: 24px;
    height: 24px;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .cookie-modal-overlay {
        padding: 0.75rem;
    }

    .cookie-modal {
        max-width: 100%;
        max-height: calc(100vh - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
    }
}

/* Responsive - Mobile */
@media (max-width: 576px) {
    .cookie-modal-overlay {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .cookie-modal {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 16px 16px 0 0;
        margin-bottom: 0;
    }

    .cookie-modal-header {
        padding: 1rem;
    }

    .cookie-modal-header h3 {
        font-size: 1.1rem;
    }

    .cookie-modal-body {
        padding: 1rem;
    }

    .cookie-intro {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .cookie-category {
        padding: 0.75rem;
    }

    .cookie-category-title {
        font-size: 0.9rem;
    }

    .cookie-category-desc {
        font-size: 0.8rem;
    }

    .cookie-modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-btn {
        width: 100%;
        padding: 0.875rem 1rem;
    }

    .cookie-fingerprint {
        bottom: 15px;
        left: 15px;
        width: 44px;
        height: 44px;
    }

    .cookie-fingerprint svg {
        width: 22px;
        height: 22px;
    }
}

/* Responsive - Very Small Screens */
@media (max-width: 380px) {
    .cookie-modal-overlay {
        padding: 0;
    }

    .cookie-modal {
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .cookie-modal-header {
        padding: 0.875rem;
    }

    .cookie-modal-header h3 {
        font-size: 1rem;
    }

    .cookie-modal-body {
        padding: 0.875rem;
    }

    .cookie-category {
        padding: 0.625rem;
        margin-bottom: 0.5rem;
    }

    .cookie-toggle {
        width: 42px;
        height: 24px;
    }

    .cookie-toggle-slider:before {
        height: 18px;
        width: 18px;
    }

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

    .cookie-modal-footer {
        padding: 0.875rem;
    }

    .cookie-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}
