:root {
    --orderdeadline-normal-color: #4e602e;
    --orderdeadline-urgent-color: #ffc107;
    --orderdeadline-very-urgent-color: #dc3545;
    --orderdeadline-background-color: #f8f9fa;
    --orderdeadline-text-color: #000;
}

.order-deadline-container {
    background: linear-gradient(180deg, var(--orderdeadline-background-color) 0%, #e9ecef 100%);
    border: 2px solid var(--orderdeadline-normal-color);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
    transition: all 0.3s ease;
    width: 95%;
    justify-self: left;
        max-width: 400px;
}

.order-deadline-container.urgent {
    border-color: var(--orderdeadline-urgent-color);
    background: linear-gradient(180deg, #fff9e6 0%, #fef5d0 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.order-deadline-container.very-urgent {
    border-color: var(--orderdeadline-very-urgent-color);
    background: linear-gradient(180deg, #ffe6e6 0%, #fdd5d5 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
    }
    50% {
        box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    }
    100% {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
    }
}

.order-deadline-message {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: 700;
    color: var(--orderdeadline-text-color);
}

.order-deadline-container.urgent .order-deadline-message {
    color: #856404;
}

.order-deadline-container.very-urgent .order-deadline-message {
    color: #721c24;
}

.order-deadline-message .material-icons {
    font-size: 20px;
    margin-right: 8px;
    color: currentColor;
}

.deadline-text {
    flex: 1;
}

.order-deadline-timer {
    text-align: center;
}

.timer-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 10px;
}

.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.time-unit {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: solid 1px #4e602e;
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 8px 8px;
    min-width: 60px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.time-unit:hover {
    transform: translateY(-2px);
}

.time-unit span:first-child {
    font-size: 20px;
    font-weight: 700;
    color: var(--orderdeadline-normal-color);
    line-height: 1;
    margin-bottom: 4px;
}

.order-deadline-container.urgent .time-unit span:first-child {
    color: var(--orderdeadline-urgent-color);
}

.order-deadline-container.very-urgent .time-unit span:first-child {
    color: var(--orderdeadline-very-urgent-color);
}

.time-unit small {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-left: 5px;
}

.time-separator {
    font-size: 24px;
    font-weight: bold;
    color: var(--orderdeadline-normal-color);
    animation: blink 1s infinite;
}

.order-deadline-container.urgent .time-separator {
    color: var(--orderdeadline-urgent-color);
}

.order-deadline-container.very-urgent .time-separator {
    color: var(--orderdeadline-very-urgent-color);
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

.deadline-expired {
    text-align: center;
    font-size: 16px;
    color: #6c757d;
    font-weight: 500;
}

.deadline-expired .material-icons {
    font-size: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .order-deadline-container {
        padding: 15px;
        margin: 10px 0;
    }
    
    .order-deadline-message {
        font-size: 14px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .order-deadline-message .material-icons {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .countdown-display {
        gap: 5px;
    }
    
    .time-unit {
        min-width: 50px;
        padding: 10px 6px 6px;
    }
    
    .time-unit span:first-child {
        font-size: 20px;
    }
    
    .time-separator {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .countdown-display {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .time-unit {
        min-width: 45px;
        padding: 8px 5px 5px;
    }
    
    .time-unit span:first-child {
        font-size: 18px;
    }
    
    .time-separator {
        display: none;
    }
}

/* Integration with PrestaShop product page */
.product-information .order-deadline-container {
    margin-top: 20px;
}

/* Integration with cart page */
.cart-summary .order-deadline-container {
    margin-bottom: 20px;
}

/* Dark theme support (if enabled) */
@media (prefers-color-scheme: dark) {
    .order-deadline-container {
        background: linear-gradient(180deg, #fff 0%, #c6b18826 100%);
        color: #ffffff;
    }
    
    .time-unit {
        background: #f5f5f5;
        color: #ffffff;
    }
    
    .timer-label,
    .deadline-expired {
        color: #000;
        font-weight:700;
        display:none;
    }
}