/* Cookie Consent Banner Styles */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

/* Simple minimal banner */
.cookie-consent-simple {
    max-height: none;
    overflow: visible;
}

.cookie-consent-simple .cookie-consent-container {
    padding: 12px 15px;
    max-width: 100%;
    overflow: hidden;
    text-align: left;
}

.cookie-consent-simple .cookie-consent-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: nowrap;
    max-width: 100%;
    text-align: left;
}

.cookie-consent-simple .cookie-consent-message {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
}

.cookie-consent-simple .cookie-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.cookie-consent-simple .cookie-text {
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    white-space: nowrap;
    text-align: left;
}

.cookie-consent-simple .cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cookie-consent-simple .btn {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 50px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.025em;
}

.cookie-consent-simple .btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    height: 32px;
}

.cookie-consent-simple .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
}

.cookie-consent-simple .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    border-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    transform: translateY(-1px);
}

.cookie-consent-simple .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border-color: #6c757d;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.1);
}

.cookie-consent-simple .btn-outline-secondary:hover {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border-color: #6c757d;
    box-shadow: 0 3px 8px rgba(108, 117, 125, 0.3);
    transform: translateY(-1px);
}

.cookie-consent-simple .btn-link {
    background-color: transparent;
    color: #007bff;
    border: none;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.cookie-consent-simple .btn-link:hover {
    color: #0056b3;
    background-color: rgba(0, 123, 255, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Detailed settings overlay */
.cookie-detailed-settings {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    pointer-events: auto;
    width: 100vw;
    height: 100vh;
}

.cookie-detailed-settings .cookie-consent-container {
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
    min-height: 400px;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    position: relative;
    z-index: 100000;
    box-sizing: border-box;
}

.cookie-detailed-settings.show .cookie-consent-container {
    transform: translateY(0);
}

.cookie-detailed-settings .cookie-consent-content {
    padding: 15px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    min-height: 300px;
    overflow: visible;
}

.cookie-detailed-settings .cookie-consent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.cookie-detailed-settings .cookie-consent-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.cookie-detailed-settings .btn-close {
    background: none;
    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-detailed-settings .btn-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Prevent body scroll when modal is open */
body.cookie-settings-open {
    overflow: hidden;
}

.cookie-consent-banner.cookie-consent-top {
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-consent-banner.cookie-consent-dark {
    background: #2c3e50;
    color: #ffffff;
    border-color: #34495e;
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.cookie-consent-dark .cookie-consent-header h3 {
    color: #ffffff;
}

.cookie-consent-message p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
}

.cookie-consent-dark .cookie-consent-message p {
    color: #ecf0f1;
}

.cookie-consent-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0;
    text-align: left;
}

.cookie-category {
    display: flex;
    align-items: center;
}

.cookie-category-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cookie-category-toggle:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.cookie-consent-dark .cookie-category-toggle {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ffffff;
}

.cookie-consent-dark .cookie-category-toggle:hover {
    background: #4a5f7a;
    border-color: #007bff;
}

.cookie-category-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    margin-right: 10px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-category-toggle input[type="checkbox"]:checked + .toggle-slider {
    background-color: #007bff;
}

.cookie-category-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.cookie-category-toggle input[type="checkbox"]:disabled + .toggle-slider {
    background-color: #28a745;
    opacity: 0.7;
}

.cookie-category-toggle input[type="checkbox"]:disabled + .toggle-slider::before {
    transform: translateX(26px);
}

.category-label {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.category-label strong {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.category-label small {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.3;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    margin-top: 5px;
}

.cookie-consent-actions .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: none;
    letter-spacing: 0.025em;
}

.cookie-consent-actions .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.cookie-consent-actions .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    border-color: #0056b3;
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    transform: translateY(-1px);
}

.cookie-consent-actions .btn-outline-primary {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.cookie-consent-actions .btn-outline-primary:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
}

.cookie-consent-actions .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border-color: #6c757d;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.1);
}

.cookie-consent-actions .btn-outline-secondary:hover {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border-color: #6c757d;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    transform: translateY(-1px);
}

.cookie-consent-actions .btn-link {
    background-color: transparent;
    color: #007bff;
    border: none;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: none;
}

.cookie-consent-actions .btn-link:hover {
    color: #0056b3;
    background-color: rgba(0, 123, 255, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Button focus states for accessibility */
.cookie-consent-actions .btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.cookie-consent-actions .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Button loading state */
.cookie-consent-actions .btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.cookie-consent-actions .btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Animation for banner appearance */
.cookie-consent-banner {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner.cookie-consent-top {
    transform: translateY(-100%);
}

.cookie-consent-banner.cookie-consent-top.show {
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cookie-consent-container {
        padding: 15px;
    }
    
    .cookie-consent-content {
        gap: 15px;
    }
    
    .cookie-consent-header h3 {
        font-size: 1.25rem;
    }
    
    .cookie-consent-message p {
        font-size: 0.9rem;
    }
    
    .cookie-consent-categories {
        gap: 8px;
    }
    
    .cookie-category-toggle {
        padding: 8px 10px;
    }
    
    .toggle-slider {
        width: 40px;
        height: 20px;
        margin-right: 10px;
    }
    
    .toggle-slider::before {
        width: 16px;
        height: 16px;
    }
    
    .cookie-category-toggle input[type="checkbox"]:checked + .toggle-slider::before {
        transform: translateX(20px);
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-consent-actions .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .cookie-consent-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Simple banner mobile styles */
    .cookie-consent-simple .cookie-consent-container {
        padding: 8px 12px;
    }
    
    .cookie-consent-simple .cookie-consent-content {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        justify-content: flex-start;
    }
    
    .cookie-consent-simple .cookie-consent-message {
        min-width: 0;
        flex: 1;
    }
    
    .cookie-consent-simple .cookie-text {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
    }
    
    .cookie-consent-simple .cookie-consent-actions {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        flex-shrink: 0;
    }
    
    .cookie-consent-simple .btn {
        min-width: 45px;
        font-size: 10px;
        padding: 4px 8px;
        height: 28px;
    }
    
    /* Detailed settings modal tablet adjustments */
    .cookie-detailed-settings .cookie-consent-container {
        margin: 0;
        max-height: 88vh;
    }
    
    .cookie-detailed-settings .cookie-consent-content {
        padding: 15px 18px 18px 18px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-container {
        padding: 10px;
    }
    
    .cookie-consent-header h3 {
        font-size: 1.1rem;
    }
    
    .cookie-consent-message p {
        font-size: 0.85rem;
    }
    
    .category-label strong {
        font-size: 0.9rem;
    }
    
    .category-label small {
        font-size: 0.8rem;
    }
    
    /* Extra small screens - maintain single line */
    .cookie-consent-simple .cookie-consent-container {
        padding: 6px 8px;
    }
    
    .cookie-consent-simple .cookie-consent-content {
        gap: 8px;
    }
    
    .cookie-consent-simple .cookie-text {
        font-size: 10px;
        text-align: left;
    }
    
    .cookie-consent-simple .cookie-consent-actions {
        gap: 3px;
    }
    
    .cookie-consent-simple .btn {
        min-width: 35px;
        font-size: 8px;
        padding: 2px 4px;
        height: 22px;
    }
    
    /* Detailed settings modal mobile adjustments */
    .cookie-detailed-settings .cookie-consent-container {
        margin: 0;
        max-height: 95vh;
        min-height: 350px;
    }
    
    .cookie-detailed-settings .cookie-consent-content {
        padding: 12px 15px 20px 15px;
        gap: 8px;
    }
    
    .cookie-detailed-settings .cookie-consent-categories {
        gap: 8px;
    }
    
    .cookie-detailed-settings .cookie-category-toggle {
        padding: 8px 10px;
    }
}

/* Dark theme adjustments */
.cookie-consent-dark .cookie-consent-actions .btn-outline-primary {
    color: #74b9ff;
    border-color: #74b9ff;
}

.cookie-consent-dark .cookie-consent-actions .btn-outline-primary:hover {
    background-color: #74b9ff;
    color: #2c3e50;
}

.cookie-consent-dark .cookie-consent-actions .btn-outline-secondary {
    color: #b2bec3;
    border-color: #b2bec3;
}

.cookie-consent-dark .cookie-consent-actions .btn-outline-secondary:hover {
    background-color: #b2bec3;
    color: #2c3e50;
}

.cookie-consent-dark .cookie-consent-actions .btn-link {
    color: #74b9ff;
}

.cookie-consent-dark .cookie-consent-actions .btn-link:hover {
    color: #a29bfe;
}
