/**
 * Cookie Consent Banner Styles - Professional & Clean
 * 
 * @package GDPR_Legal_Compliance
 */

/* Reset and base styles */
.glc-modal-overlay,
.cookie-modal * {
    box-sizing: border-box;
}

/* Overlay */
#glc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
}

/* Modal container */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cookie-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal content */
.modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.cookie-modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Scrollbar styling */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #c1c7cd;
    border-radius: 3px;
}

/* Header */
.modal-header {
    padding: 30px 35px 20px;
    text-align: center;
    border-bottom: 1px solid #eef2f6;
}

.modal-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.modal-header p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* Progress indicator */
.progress-indicator {
    margin-top: 18px;
}

.progress-text {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 6px;
}

.progress-bar {
    height: 6px;
    background: #e9edf2;
    border-radius: 4px;
    max-width: 280px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #22c55e;
    width: 0;
    transition: width 0.4s ease;
    border-radius: 4px;
}

/* Cookie cards */
.cookie-cards {
    display: flex;
    gap: 18px;
    padding: 25px 35px;
    justify-content: center;
}

.cookie-card {
    flex: 1;
    min-width: 180px;
    max-width: 260px;
    padding: 20px 22px;
    border: 2px solid #e9edf2;
    border-radius: 16px;
    background: #fafbfc;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cookie-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cookie-card.required {
    border-color: #22c55e;
    background: #f0fdf4;
}

/* Card header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
}

.card-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.card-badge:not(:empty) {
    background: #e2e8f0;
    color: #475569;
}

.cookie-card.required .card-badge {
    background: #22c55e;
    color: #fff;
}

.card-description {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 12px;
    flex: 1;
}

/* Toggle */
.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #e9edf2;
}

.toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-block;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 34px;
    transition: background 0.3s ease;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

input:checked + .slider {
    background: #22c55e;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

input:disabled + .slider {
    background: #22c55e;
    opacity: 0.5;
    cursor: not-allowed;
}

input:disabled + .slider:before {
    transform: translateX(22px);
}

/* Footer */
.modal-footer {
    padding: 18px 35px 25px;
    border-top: 1px solid #eef2f6;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Buttons */
.cookie-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.cookie-btn:focus-visible {
    outline: 2px solid #1e293b;
    outline-offset: 2px;
}

.btn-accept {
    background: #22c55e;
    color: #ffffff;
}

.btn-accept:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.btn-accept:active {
    transform: translateY(0);
}

.btn-accept:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-reject {
    background: #f1f5f9;
    color: #475569;
}

.btn-reject:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.btn-reject:active {
    transform: translateY(0);
}

/* Legal disclaimer in modal */
.modal-legal {
    padding: 10px 35px 20px;
    text-align: center;
    border-top: 1px solid #eef2f6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-legal small {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}

.modal-legal small a {
    color: #3b82f6;
    text-decoration: none;
}

.modal-legal small a:hover {
    text-decoration: underline;
}

.modal-legal .glc-revoke-consent-btn {
    color: #64748b;
    cursor: pointer;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .modal-content {
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        max-width: 100%;
    }

    .modal-header {
        padding: 20px 18px 14px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-header p {
        font-size: 14px;
    }

    .cookie-cards {
        flex-direction: column;
        align-items: center;
        padding: 16px 18px;
        gap: 12px;
    }

    .cookie-card {
        max-width: 100%;
        width: 100%;
        min-width: 0;
        padding: 16px 18px;
    }

    .modal-footer {
        padding: 14px 18px 18px;
        flex-direction: column;
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
        min-width: 0;
        padding: 14px;
        font-size: 15px;
    }

    .modal-legal {
        padding: 10px 18px 16px;
    }

    .modal-legal small {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 18px;
    }

    .card-title {
        font-size: 14px;
    }

    .toggle-switch {
        width: 42px;
        height: 24px;
    }

    .slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(18px);
    }
}
