/**
 * Cookie Consent Banner Styles
 * Стили для баннера согласия на использование cookie
 */

/* ============================================
   Cookie Consent Banner
   ============================================ */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e0e0e0;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .cookie-consent-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .cookie-consent-message {
        flex: 1;
        padding-right: 20px;
    }
}

.cookie-consent-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.cookie-consent-message a {
    color: #007bff;
    text-decoration: underline;
}

.cookie-consent-message a:hover {
    text-decoration: none;
}

/* ============================================
   Buttons
   ============================================ */

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

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

/* Кнопка "Принять все" */
.btn-cookie-accept-all {
    background-color: #28a745;
    color: #ffffff;
    border-color: #28a745;
}

.btn-cookie-accept-all:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Кнопка "Отклонить все" */
.btn-cookie-reject-all {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}

.btn-cookie-reject-all:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Кнопка "Настроить" */
.btn-cookie-settings {
    background-color: #ffffff;
    color: #333333;
    border-color: #cccccc;
}

.btn-cookie-settings:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* ============================================
   Modal Settings
   ============================================ */

.cookie-settings-modal .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.cookie-settings-modal .modal-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px;
}

.cookie-settings-modal .modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.cookie-settings-modal .modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.cookie-settings-intro {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

/* ============================================
   Cookie Categories
   ============================================ */

.cookie-category {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    transition: border-color 0.2s ease;
}

.cookie-category:hover {
    border-color: #007bff;
}

.cookie-category-header {
    margin-bottom: 10px;
}

.cookie-category-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.cookie-category-toggle {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.cookie-category-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

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

.cookie-category-required {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
    margin-left: 8px;
}

.cookie-category-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
    padding-left: 32px;
}

/* ============================================
   Cookie List
   ============================================ */

.cookie-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 32px;
    font-size: 12px;
    color: #666;
}

.cookie-list li {
    margin-bottom: 5px;
}

.cookie-list code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #d63384;
}

/* ============================================
   Modal Footer
   ============================================ */

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

.cookie-settings-footer .btn {
    min-width: 120px;
}

/* ============================================
   Floating Action Button
   ============================================ */

.cookie-settings-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #007bff;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-fab:hover {
    background: #0056b3;
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    transform: scale(1.05);
}

.cookie-settings-fab svg {
    fill: currentColor;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 767px) {
    .cookie-consent-container {
        padding: 15px;
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
    }
    
    .cookie-consent-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .cookie-settings-modal .modal-dialog {
        margin: 10px;
    }
    
    .cookie-settings-modal .modal-body {
        max-height: 50vh;
    }
    
    .cookie-settings-footer {
        flex-direction: column;
    }
    
    .cookie-settings-footer .btn {
        width: 100%;
    }
}

/* ============================================
   Accessibility
   ============================================ */

.cookie-consent-banner:focus,
.cookie-settings-fab:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border: 2px solid #000;
    }
    
    .cookie-consent-buttons .btn {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner {
        animation: none;
    }
    
    .cookie-settings-fab {
        transition: none;
    }
}

/* ============================================
   Dark Mode Support (optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: #1a1a1a;
        border-top-color: #333;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .cookie-consent-message {
        color: #e0e0e0;
    }
    
    .cookie-category {
        border-color: #333;
        background: #2a2a2a;
    }
    
    .cookie-category:hover {
        border-color: #007bff;
    }
    
    .cookie-category-desc {
        color: #aaa;
    }
    
    .cookie-list code {
        background: #333;
        color: #ff69b4;
    }
    
    .cookie-settings-modal .modal-content {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .cookie-settings-modal .modal-header {
        border-bottom-color: #333;
    }
    
    .cookie-settings-modal .modal-title {
        color: #e0e0e0;
    }
    
    .cookie-settings-footer {
        border-top-color: #333;
    }
}
