/* ===============================================
   БОКОВАЯ ВКЛАДКА БЕСПЛАТНОЙ ДОСТАВКИ
   =============================================== */

.free-delivery-notification {
    position: fixed;
    top: 50%;
    right: -400px; /* Скрыта изначально */
    transform: translateY(-50%);
    width: 380px;
    max-width: 90vw;
    z-index: 9999;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.free-delivery-notification.visible {
    right: 20px;
}

.free-delivery-notification.hidden {
    right: -400px;
}

.notification-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    color: white;
    position: relative;
    overflow: hidden;
    animation: slideInBounce 0.6s ease-out;
}

@keyframes slideInBounce {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    60% {
        transform: translateX(-10px);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
    }
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.notification-icon {
    text-align: center;
    padding: 20px 20px 10px;
    color: rgba(255, 255, 255, 0.9);
}

.notification-icon svg {
    width: 48px;
    height: 48px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.notification-header {
    text-align: center;
    padding: 0 20px 15px;
}

.notification-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-body {
    padding: 0 20px 20px;
}

.message {
    text-align: center;
    font-size: 16px;
    margin: 0 0 20px;
    line-height: 1.5;
    font-weight: 400;
}

.amount-needed {
    font-weight: 700;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-container {
    margin: 20px 0;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #00f5ff 0%, #00c4ff 100%);
    height: 100%;
    border-radius: 12px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

.delivery-info {
    margin: 20px 0 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(10px);
}

.delivery-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}

.delivery-item:last-child {
    margin-bottom: 0;
}

.delivery-item .icon {
    font-size: 16px;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.notification-actions {
    padding: 0 20px 24px;
}

.btn-continue-shopping {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-continue-shopping:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-continue-shopping:active {
    transform: translateY(0);
}

/* ===============================================
   АДАПТИВНОСТЬ
   =============================================== */

@media (max-width: 768px) {
    .free-delivery-notification {
        right: -350px;
        width: 320px;
    }
    
    .free-delivery-notification.visible {
        right: 10px;
    }
    
    .notification-header h3 {
        font-size: 20px;
    }
    
    .message {
        font-size: 15px;
    }
    
    .amount-needed {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .free-delivery-notification {
        right: -100vw;
        width: calc(100vw - 20px);
        max-width: none;
    }
    
    .free-delivery-notification.visible {
        right: 10px;
    }
    
    .notification-content {
        border-radius: 12px;
    }
    
    .notification-header h3 {
        font-size: 18px;
    }
    
    .message {
        font-size: 14px;
    }
    
    .delivery-item {
        font-size: 13px;
    }
}

/* ===============================================
   ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ
   =============================================== */

/* Тень для создания глубины */
.free-delivery-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
    z-index: -1;
    filter: blur(20px);
}

/* Анимация для чисел */
.amount-needed,
.current-amount,
.target-amount {
    display: inline-block;
    transition: all 0.3s ease;
}

.amount-needed.updating,
.current-amount.updating,
.target-amount.updating {
    transform: scale(1.1);
    color: #00f5ff;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* Эффект появления элементов */
.notification-content > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.notification-icon {
    animation-delay: 0.1s;
}

.notification-header {
    animation-delay: 0.2s;
}

.notification-body {
    animation-delay: 0.3s;
}

.notification-actions {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   ТЕМНАЯ ТЕМА (если используется)
   =============================================== */

@media (prefers-color-scheme: dark) {
    .free-delivery-notification {
        /* Стили уже подходят для темной темы */
    }
}

/* ===============================================
   ВЫСОКИЙ КОНТРАСТ (для доступности)
   =============================================== */

@media (prefers-contrast: high) {
    .notification-content {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        border: 2px solid white;
    }
    
    .close-btn {
        background: rgba(255, 255, 255, 0.8);
        color: black;
    }
    
    .progress-fill {
        background: white;
    }
}

/* ===============================================
   АНИМАЦИИ ДЛЯ УМЕНЬШЕНИЯ ДВИЖЕНИЯ
   =============================================== */

@media (prefers-reduced-motion: reduce) {
    .free-delivery-notification,
    .notification-content,
    .notification-content > *,
    .progress-fill,
    .close-btn,
    .btn-continue-shopping {
        animation: none !important;
        transition: none !important;
    }
    
    .notification-icon svg {
        animation: none;
    }
    
    .progress-fill::after {
        animation: none;
    }
} 