/* cookie.css - стили для баннера и плавающей кнопки */

/* Баннер */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a2a3a;
    color: #fff;
    padding: 1rem 1.5rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
}

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

.cookie-banner .btn-accept {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-banner .btn-accept:hover {
    background-color: #0b5ed7;
}

.cookie-banner .btn-settings {
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #dee2e6;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-banner .btn-settings:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: #adb5bd;
}

.cookie-banner a {
    color: #86b7fe;
    text-decoration: none;
}

.cookie-banner a:hover {
    text-decoration: underline;
}

/* Плавающая кнопка */
.cookie-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.cookie-floating-btn button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.cookie-floating-btn button:hover {
    background-color: #0b5ed7;
    transform: scale(1.05);
}

/* Модальное окно (настройки cookie) */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    max-width: 500px;
    width: 90%;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

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

.cookie-modal-header {
    padding: 1.25rem 1.5rem 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.cookie-modal-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

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

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-option {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.cookie-option-always {
    background: #e8f0fe;
}

.cookie-option-toggle {
    background: white;
    border: 1px solid #dee2e6;
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-option-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cookie-option-desc {
    font-size: 12px;
    color: #6c757d;
    margin-top: 0.25rem;
}

.badge-always {
    background-color: #28a745;
    color: white;
    font-size: 11px;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
}

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

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

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

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

.cookie-switch input:checked + .slider {
    background-color: #0d6efd;
}

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

.cookie-modal-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.cookie-btn-secondary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    cursor: pointer;
}

.cookie-btn-primary {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
}

.cookie-btn-primary:hover {
    background-color: #0b5ed7;
}

@media (max-width: 576px) {
    .cookie-banner {
        padding: 1rem;
    }
    .cookie-banner .cookie-banner-inner {
        flex-direction: column;
        gap: 12px;
    }
    .cookie-modal-content {
        width: 95%;
    }
}