/**
 * Cookie Consent Pro - Standalone CSS
 * Professional GDPR-compliant cookie consent management
 * Pure CSS implementation for maximum compatibility
 */

/* Base Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1a1a1a;
    color: #ffffff;
    padding: 20px;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    border-top: 3px solid #007bff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
}

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

/* Position Variants */
.cookie-consent-banner.position-bottom {
    bottom: 0;
}

.cookie-consent-banner.position-top {
    top: 0;
    transform: translateY(-100%);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    border-top: none;
    border-bottom: 3px solid #007bff;
}

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

.cookie-consent-banner.position-center {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%) scale(0.8);
    max-width: 600px;
    border-radius: 8px;
    border: 3px solid #007bff;
    opacity: 0;
}

.cookie-consent-banner.position-center.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Theme Variants */
.cookie-consent-banner.theme-light {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.15);
}

.cookie-consent-banner.theme-light.position-top {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

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

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
    margin-right: 15px;
}

.cookie-consent-text h5 {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 1.1em;
    display: flex;
    align-items: center;
}

.cookie-consent-text h5 i {
    margin-right: 8px;
    color: #007bff;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
    opacity: 0.9;
}

/* Action Buttons */
.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    outline: none;
    position: relative;
}

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

.cookie-consent-btn:active {
    transform: translateY(0);
}

.cookie-consent-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.cookie-consent-btn.btn-accept {
    background: #28a745;
    color: white;
}

.cookie-consent-btn.btn-accept:hover {
    background: #218838;
}

.cookie-consent-btn.btn-decline {
    background: #6c757d;
    color: white;
}

.cookie-consent-btn.btn-decline:hover {
    background: #5a6268;
}

.cookie-consent-btn.btn-settings {
    background: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}

.cookie-consent-btn.btn-settings:hover {
    background: #007bff;
    color: white;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    backdrop-filter: blur(3px);
}

.cookie-settings-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.cookie-settings-content {
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideInUp 0.3s ease-out;
}

.cookie-settings-content.theme-light {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Modal Header */
.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.cookie-settings-content.theme-light .cookie-settings-header {
    border-bottom-color: #eee;
}

.cookie-settings-header h4 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
}

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

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

.cookie-settings-content.theme-light .cookie-settings-close:hover {
    background-color: #f5f5f5;
}

.cookie-settings-close:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Modal Description */
.cookie-settings-description {
    margin-bottom: 25px;
}

.cookie-settings-description p {
    margin: 0;
    color: #ccc;
    line-height: 1.5;
}

.cookie-settings-content.theme-light .cookie-settings-description p {
    color: #666;
}

/* Cookie Categories */
.cookie-categories {
    margin-bottom: 25px;
}

.cookie-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.cookie-settings-content.theme-light .cookie-category {
    border-bottom-color: #eee;
}

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

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

.cookie-category h6 {
    margin: 0;
    font-weight: 600;
    font-size: 1em;
}

/* 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: #28a745;
}

.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 input:focus + .cookie-toggle-slider {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Category Description and Cookie List */
.cookie-category-description {
    font-size: 0.85em;
    color: #999;
    line-height: 1.4;
    margin-bottom: 10px;
}

.cookie-settings-content.theme-light .cookie-category-description {
    color: #666;
}

.cookie-list {
    font-size: 0.8em;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.cookie-settings-content.theme-light .cookie-list {
    color: #888;
}

/* Modal Actions */
.cookie-settings-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookie-settings-content.theme-light .cookie-settings-actions {
    border-top-color: #eee;
}

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 15px;
    }

    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cookie-consent-text {
        margin-right: 0;
        margin-bottom: 0;
        min-width: auto;
    }
    
    .cookie-consent-actions {
        justify-content: stretch;
        gap: 8px;
    }
    
    .cookie-consent-btn {
        flex: 1;
        text-align: center;
        padding: 12px 16px;
    }
    
    .cookie-settings-modal {
        padding: 15px;
    }

    .cookie-settings-content {
        padding: 20px;
        margin: 0;
        max-height: 90vh;
    }
    
    .cookie-settings-actions {
        flex-direction: column;
        gap: 10px;
    }

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

    .cookie-consent-banner.position-center {
        left: 15px;
        right: 15px;
        top: 50%;
        transform: translateY(-50%) scale(0.95);
        max-width: none;
    }

    .cookie-consent-banner.position-center.show {
        transform: translateY(-50%) scale(1);
    }

    .cookie-category-header {
        gap: 15px;
    }

    .cookie-category h6 {
        flex: 1;
    }
}

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

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

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

    .cookie-consent-btn {
        font-size: 0.85em;
        padding: 10px 14px;
    }

    .cookie-settings-content {
        padding: 15px;
    }

    .cookie-settings-header h4 {
        font-size: 1.1em;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-width: 4px;
    }

    .cookie-consent-btn {
        border-width: 2px;
    }

    .cookie-consent-btn:focus {
        outline-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner {
        transition: none;
    }

    .cookie-consent-btn {
        transition: none;
    }

    .cookie-toggle-slider {
        transition: none;
    }

    .cookie-toggle-slider:before {
        transition: none;
    }

    .cookie-settings-modal.show {
        animation: none;
    }

    .cookie-settings-content {
        animation: none;
    }

    .cookie-consent-banner.show {
        animation: none;
    }
}

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