/* catalog/view/theme/default/stylesheet/product-timer.css */

/* Основні стилі таймера в стилі зображення */
.product-timer {
    text-align: center;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.timer-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: normal;
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.timer-unit {
    display: flex;
    align-items: center;
    gap: 3px;
}

.timer-digit {
    background: #ff6b35;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.timer-separator {
    color: #ff6b35;
    font-size: 18px;
    font-weight: bold;
    margin: 0 2px;
}

/* Компактний варіант для каталогу */
.product-timer.compact .timer-digit {
    width: 28px;
    height: 28px;
    font-size: 16px;
}

.product-timer.compact .timer-label {
    font-size: 12px;
}

.product-timer.compact .timer-separator {
    font-size: 16px;
}

/* Мінімальний варіант */
.product-timer.minimal .timer-digit {
    width: 24px;
    height: 24px;
    font-size: 14px;
}

.product-timer.minimal .timer-label {
    font-size: 11px;
}

.product-timer.minimal .timer-separator {
    font-size: 14px;
}

/* Великий варіант для сторінки товару */
.product-timer.large .timer-digit {
    width: 40px;
    height: 40px;
    font-size: 22px;
}

.product-timer.large .timer-label {
    font-size: 16px;
}

.product-timer.large .timer-separator {
    font-size: 22px;
}

/* Контейнери */
.timer-container {
    margin: 15px 0;
}

.product-timer-container {
    margin: 8px 0;
}

/* Інтеграція в карточки товарів */
.product-thumb .product-timer-container {
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

/* Анімація блимання для двокрапки */
.timer-separator {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* Ховер ефект для цифр */
.timer-digit:hover {
    background: #e55a2b;
    transition: background-color 0.2s ease;
}

/* Анімація появи */
.product-timer {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Адаптивні стилі */
@media (max-width: 768px) {
    .timer-digit {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .timer-label {
        font-size: 13px;
    }

    .timer-separator {
        font-size: 16px;
    }

    .timer-display {
        gap: 2px;
    }

    .timer-unit {
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .timer-digit {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .timer-label {
        font-size: 12px;
    }

    .timer-separator {
        font-size: 14px;
    }

    .timer-display {
        gap: 1px;
    }

    .timer-unit {
        gap: 1px;
    }
}

/* Стан перезапуску */
.product-timer.restarting .timer-digit {
    background: #ffa726;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Альтернативні кольорові схеми */
.product-timer.green .timer-digit {
    background: #4caf50;
}

.product-timer.blue .timer-digit {
    background: #2196f3;
}

.product-timer.red .timer-digit {
    background: #f44336;
}

.product-timer.purple .timer-digit {
    background: #9c27b0;
}

/* Стилі для тексту під таймером */
.timer-bottom-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    font-style: italic;
}

/* Спеціальні позиції */
.product-timer.fixed-bottom {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
}

.product-timer.sticky-top {
    position: sticky;
    top: 10px;
    z-index: 100;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Інтеграція з модальними вікнами */
.modal .product-timer .timer-digit {
    width: 30px;
    height: 30px;
    font-size: 16px;
}

/* Печатні стилі */
@media print {
    .product-timer .timer-digit {
        background: #999 !important;
        color: white !important;
        border: 1px solid #666;
    }

    .timer-separator {
        color: #999 !important;
    }
}