/**
 * GDPR Cookie Consent Banner Styles
 * Waves&Vibes
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid var(--ocean-blue, #0077be);
}

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

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

.cookie-consent-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: #333;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.95em;
    color: #666;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: var(--ocean-blue, #0077be);
    text-decoration: underline;
}

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

/* Cookie Buttons */
.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: var(--ocean-blue, #0077be);
    color: white;
}

.cookie-btn-primary:hover {
    background: var(--ocean-deep, #005a8c);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cookie-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

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

/* Cookie Customization Modal */
.cookie-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

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

.cookie-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

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

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

.cookie-modal-body > p {
    margin-top: 0;
    color: #666;
    line-height: 1.6;
}

.cookie-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Cookie Categories */
.cookie-category {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

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

.cookie-category-title {
    font-weight: 600;
    color: #333;
    font-size: 1em;
    margin-left: 10px;
}

.cookie-category-badge {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.cookie-category-description {
    margin: 10px 0 0 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-switch-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.cookie-switch-input {
    position: relative;
    width: 50px;
    height: 26px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #ccc;
    outline: none;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.cookie-switch-input:checked {
    background: var(--ocean-blue, #0077be);
}

.cookie-switch-input:disabled {
    background: #28a745;
    cursor: not-allowed;
}

.cookie-switch-input::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

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

    .cookie-consent-text {
        text-align: center;
    }

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

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

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

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

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

    .cookie-consent-text h3 {
        font-size: 1em;
    }

    .cookie-consent-text p {
        font-size: 0.85em;
    }

    .cookie-btn {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    .cookie-modal-header h3 {
        font-size: 1.1em;
    }
}

/* Accessibility */
.cookie-btn:focus,
.cookie-switch-input:focus,
.cookie-modal-close:focus {
    outline: 2px solid var(--ocean-blue, #0077be);
    outline-offset: 2px;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Print - Hide cookie banner */
@media print {
    .cookie-consent-banner,
    .cookie-modal,
    .cookie-modal-overlay {
        display: none !important;
    }
}
