/* =========================================================================
   Cookie Consent Banner & Modal - Modern Design
   ========================================================================= */

/* Banner Base */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    padding: 16px 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner.hidden {
    display: none;
}

.cookie-consent-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.cookie-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.cookie-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #40CC79 0%, #30b867 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cookie-icon i {
    font-size: 20px;
    color: white;
}

.cookie-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    flex: 1;
}

.cookie-close {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #666;
    flex-shrink: 0;
}

.cookie-close:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.cookie-close i {
    font-size: 18px;
}

/* Content */
.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-description {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.cookie-quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-quick-actions .btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-settings {
    background: #f5f5f5;
    color: #333;
}

.btn-settings:hover {
    background: #e0e0e0;
}

.btn-accept-all {
    background: linear-gradient(135deg, #40CC79 0%, #30b867 100%);
    color: white;
}

.btn-accept-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 204, 121, 0.3);
}

.btn-reject-all {
    background: #fff;
    color: #666;
    border: 2px solid #ddd;
}

.btn-reject-all:hover {
    border-color: #40CC79;
    color: #40CC79;
}

.cookie-policy-link-inline {
    color: #40CC79;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.cookie-policy-link-inline:hover {
    color: #30b867;
    text-decoration: underline;
}

.cookie-close {
    display: none;
}

/* Modal Styles */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.cookie-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #eee;
}

.cookie-modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #666;
}

.cookie-modal-close:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.cookie-modal-close i {
    font-size: 22px;
}

.cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

/* Cookie Categories */
.cookie-category {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-info h4 i {
    color: #40CC79;
    font-size: 18px;
}

.cookie-category-info p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.cookie-category-details {
    padding-left: 0;
}

.cookie-category-details small {
    color: #888;
    font-size: 12px;
    line-height: 1.4;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.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: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background: linear-gradient(135deg, #40CC79 0%, #30b867 100%);
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

.cookie-switch.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-switch.disabled .cookie-slider {
    cursor: not-allowed;
}

.btn-save-preferences {
    background: linear-gradient(135deg, #40CC79 0%, #30b867 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-save-preferences:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 204, 121, 0.3);
}

/* Desktop Optimizations */
@media (min-width: 769px) {
    .cookie-consent-banner {
        padding: 14px 32px;
    }

    .cookie-content {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .cookie-description {
        flex: 1;
    }

    .cookie-quick-actions {
        flex-shrink: 0;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 16px 20px;
    }

    .cookie-modal-content {
        max-height: 95vh;
    }

    .cookie-quick-actions {
        flex-direction: column;
    }

    .cookie-quick-actions .btn {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner,
    .cookie-modal-content {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .cookie-title,
    .cookie-modal-header h3,
    .cookie-category-info h4 {
        color: #ffffff;
    }

    .cookie-description,
    .cookie-category-info p {
        color: #b0b0b0;
    }

    .cookie-category {
        background: #2a2a2a;
    }

    .cookie-close:hover,
    .cookie-modal-close:hover {
        background: #333;
    }

    .btn-settings {
        background: #333;
        color: #e0e0e0;
    }

    .btn-settings:hover {
        background: #444;
    }

    .btn-reject-all {
        background: #2a2a2a;
        border-color: #444;
        color: #b0b0b0;
    }

    .btn-reject-all:hover {
        border-color: #40CC79;
        color: #40CC79;
    }

    .cookie-modal-header,
    .cookie-modal-footer {
        border-color: #333;
    }

    .cookie-modal-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Accessibility */
button:focus-visible {
    outline: 2px solid #40CC79;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .cookie-consent-banner,
    .cookie-modal {
        display: none !important;
    }
}
