/**
 * Cookie Consent Styles
 *
 * @version 1.0
 */

/* ==================== Banner ==================== */

.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #2d3748;
    border-top: 1px solid #3e4c5e;
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
}

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

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-consent-content {
    flex: 1;
    min-width: 280px;
}

.cookie-consent-content h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.cookie-consent-content p {
    color: #cbd5e0;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==================== Buttons ==================== */

.btn-accept {
    background: #22c55e;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-accept:hover {
    background: #1ab84d;
}

.btn-reject {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-customize {
    background: transparent;
    color: #64748b;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-customize:hover {
    color: #94a3b8;
    text-decoration: underline;
}

/* ==================== Modal ==================== */

.cookie-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-consent-modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== Modal Header ==================== */

.cookie-consent-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-consent-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.cookie-consent-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

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

/* ==================== Modal Body ==================== */

.cookie-consent-modal-body {
    padding: 24px;
}

.cookie-category {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.cookie-category:last-child {
    border-bottom: none;
}

.category-info {
    flex: 1;
    padding-right: 20px;
}

.category-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.category-info p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.category-toggle {
    flex-shrink: 0;
}

.category-toggle input[type="checkbox"] {
    width: 48px;
    height: 28px;
    -webkit-appearance: none;
    appearance: none;
    background: #cbd5e0;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.category-toggle input[type="checkbox"]:checked {
    background: #22c55e;
}

.category-toggle input[type="checkbox"]:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.category-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-toggle input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

/* ==================== Modal Footer ==================== */

.cookie-consent-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.privacy-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.privacy-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.btn-save {
    background: #22c55e;
    color: #ffffff;
    border: none;
    padding: 10px 32px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-save:hover {
    background: #1ab84d;
}

/* ==================== Responsive Design ==================== */

@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 12px 16px;
    }

    .cookie-consent-container {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-content {
        min-width: auto;
    }

    .cookie-consent-actions {
        justify-content: stretch;
    }

    .btn-accept,
    .btn-reject,
    .btn-customize {
        flex: 1;
        text-align: center;
    }

    .cookie-consent-modal-content {
        max-height: 90vh;
    }

    .cookie-consent-modal-header {
        padding: 16px;
    }

    .cookie-consent-modal-header h3 {
        font-size: 18px;
    }

    .cookie-consent-modal-body {
        padding: 16px;
    }

    .cookie-category {
        flex-direction: column;
    }

    .category-toggle {
        margin-top: 12px;
        align-self: flex-start;
    }

    .category-toggle input[type="checkbox"] {
        width: 48px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-actions {
        flex-direction: column;
    }

    .btn-accept,
    .btn-reject,
    .btn-customize {
        width: 100%;
    }
}
