/**
 * Cookie Consent Banner & Modal Styles
 * GDPR-compliant cookie consent UI
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 3px solid var(--primary-color);
}

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

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

.cookie-icon {
    font-size: 40px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h5 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.cookie-text p {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.cookie-link {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-link:hover {
    color: var(--primary-color);
}

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

.btn-cookie {
    padding: 10px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cookie-accept {
    background: var(--secondary-color);
    color: #fff;
}

.btn-cookie-accept:hover {
    background: #ff7744;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 102, 0.3);
}

.btn-cookie-reject {
    background: #e0e0e0;
    color: #333;
}

.btn-cookie-reject:hover {
    background: #d0d0d0;
}

.btn-cookie-customize {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-cookie-customize:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-cookie-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-cookie-secondary:hover {
    background: #e0e0e0;
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.cookie-modal-content {
    background: #fff;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

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

.cookie-modal-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 22px;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

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

.cookie-category {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

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

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cookie-category h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
}

.cookie-category-desc {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 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%;
}

input:checked + .cookie-slider {
    background-color: var(--secondary-color);
}

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

.cookie-switch.disabled .cookie-slider {
    background-color: var(--primary-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-modal-footer {
    padding: 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-icon {
        font-size: 32px;
    }

    .cookie-text {
        min-width: auto;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-cookie {
        width: 100%;
        text-align: center;
    }

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

    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .btn-cookie {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .cookie-consent-banner {
        padding: 15px;
    }

    .cookie-text h5 {
        font-size: 16px;
    }

    .cookie-text p {
        font-size: 13px;
    }

    .btn-cookie {
        padding: 8px 20px;
        font-size: 13px;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 16px;
    }
}
