/**
 * Google Consent Mode v2 - Cookie Consent Banner Styles
 * Responsive and GDPR-compliant design
 */

/* Banner Container */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #4CAF50;
}

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

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

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

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

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

.cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-consent-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.cookie-consent-btn.primary {
    background: #4CAF50;
    color: #ffffff;
}

.cookie-consent-btn.primary:hover {
    background: #45a049;
}

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

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

.cookie-consent-btn.tertiary {
    background: transparent;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.cookie-consent-btn.tertiary:hover {
    background: #f1f8f4;
}

/* Settings Modal */
#cookie-consent-settings {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cookie-consent-settings.show {
    display: flex;
}

.cookie-settings-modal {
    background: #ffffff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.cookie-settings-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

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

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

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

.cookie-category {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #4CAF50;
}

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

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

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

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #4CAF50;
}

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

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

.cookie-toggle-label {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

.cookie-settings-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cookie-settings-info {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

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

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

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

    .cookie-settings-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

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

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

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

    .cookie-consent-text h3 {
        font-size: 15px;
    }

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

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

    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding: 15px;
    }

    .cookie-category {
        padding: 12px;
    }
}

/* Accessibility */
.cookie-consent-btn:focus,
.cookie-toggle input:focus + .cookie-toggle-slider,
.cookie-settings-close:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#cookie-consent-banner.show {
    animation: slideUp 0.3s ease-out;
}

#cookie-consent-settings.show {
    animation: fadeIn 0.2s ease-out;
}
