/**
 * GDPR Cookie Consent System - Styles
 * Client Side PDF - Cookie Management
 * Version 1.0
 */

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white, #FFFFFF);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.cookie-banner h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #1F2937);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-banner p {
    color: var(--text-secondary, #6B7280);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.cookie-banner a {
    color: var(--primary-color, #5B5FDE);
    text-decoration: none;
    font-weight: 500;
}

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

.cookie-banner-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Cookie Buttons */
.cookie-btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md, 0.75rem);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-family: 'Inter', sans-serif;
}

.cookie-btn-primary {
    background: var(--primary-color, #5B5FDE);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.cookie-btn-primary:hover {
    background: var(--primary-hover, #4B4FCE);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.cookie-btn-secondary {
    background: var(--bg-lighter, #F3F4F6);
    color: var(--text-primary, #1F2937);
}

.cookie-btn-secondary:hover {
    background: var(--border-light, #E5E7EB);
}

.cookie-btn-outline {
    background: transparent;
    color: var(--text-secondary, #6B7280);
    border: 2px solid var(--border-light, #E5E7EB);
}

.cookie-btn-outline:hover {
    border-color: var(--primary-color, #5B5FDE);
    color: var(--primary-color, #5B5FDE);
}

/* Cookie Preferences Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: var(--bg-white, #FFFFFF);
    border-radius: var(--radius-xl, 1.5rem);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.cookie-modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-light, #E5E7EB);
}

.cookie-modal-header h2 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary, #1F2937);
    margin: 0;
}

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

.cookie-category {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light, #E5E7EB);
}

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

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

.cookie-category h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #1F2937);
    margin: 0 0 0.5rem 0;
}

.cookie-category p {
    color: var(--text-secondary, #6B7280);
    margin: 0.5rem 0;
    font-size: 0.9375rem;
}

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

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-light, #E5E7EB);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 28px;
}

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

input:checked + .toggle-slider {
    background-color: var(--success-color, #10B981);
}

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

input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 2rem;
    border-top: 1px solid var(--border-light, #E5E7EB);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Preference Button (Floating) */
.preferences-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color, #5B5FDE);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg, 1rem);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.preferences-btn:hover {
    background: var(--primary-hover, #4B4FCE);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm, 0.5rem);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

.badge-required {
    background: var(--danger-color, #EF4444);
    color: white;
}

.badge-optional {
    background: var(--success-color, #10B981);
    color: white;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        padding: 1.5rem 1rem;
    }

    .cookie-banner h3 {
        font-size: 1.25rem;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .preferences-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }

    .cookie-modal {
        padding: 1rem;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1.5rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.5rem;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cookie-category-header > div {
        width: 100%;
    }
}

/* Ensure modal scrollbar is styled */
.cookie-modal-content::-webkit-scrollbar {
    width: 8px;
}

.cookie-modal-content::-webkit-scrollbar-track {
    background: var(--bg-lighter, #F3F4F6);
    border-radius: 4px;
}

.cookie-modal-content::-webkit-scrollbar-thumb {
    background: var(--text-muted, #9CA3AF);
    border-radius: 4px;
}

.cookie-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary, #6B7280);
}
