/* Incident Countdown Frontend Styles */
.ic-countdown {
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Width Options - These override the base class */
.ic-countdown.ic-width-default {
    max-width: 600px;
}

.ic-countdown.ic-width-wide {
    max-width: 800px;
}

.ic-countdown.ic-width-full {
    max-width: 100%;
    padding: 25px 15px;
}

.ic-countdown.ic-width-custom {
    /* Custom width will be set via inline style */
}

.ic-countdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
}

/* Count Up Mode Styling */
.ic-countdown.ic-mode-countup {
    border-color: #46b450;
}

.ic-countdown.ic-mode-countup::before {
    background: linear-gradient(90deg, #46b450, #64c470);
}

.ic-countdown.ic-mode-countup .ic-timer span {
    background: #46b450;
    box-shadow: 0 2px 4px rgba(70, 180, 80, 0.3);
}

.ic-countdown.ic-mode-countup .ic-timer span:hover {
    box-shadow: 0 4px 8px rgba(70, 180, 80, 0.4);
}

.ic-since-label {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ic-countdown h3 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 24px;
    font-weight: 600;
    word-wrap: break-word;
}

.ic-countdown p {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.ic-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.ic-timer span {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
    min-width: 80px;
    max-width: 120px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.3);
    transition: all 0.3s ease;
    word-break: keep-all;
    white-space: nowrap;
}

.ic-timer span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.4);
}

.ic-countdown.ic-expired {
    border-color: #dc3232;
    opacity: 0.8;
}

.ic-countdown.ic-expired::before {
    background: linear-gradient(90deg, #dc3232, #e65054);
}

.ic-countdown.ic-expired .ic-timer {
    display: none;
}

.ic-expired-message {
    color: #dc3232;
    font-weight: bold;
    font-size: 16px;
    padding: 15px;
    background: #fef7f7;
    border: 1px solid #dc3232;
    border-radius: 4px;
    margin: 15px 0;
}

/* Compact Format */
.ic-countdown[data-format="compact"] .ic-timer {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    gap: 5px;
}

.ic-countdown[data-format="compact"] .ic-timer span {
    background: transparent;
    color: #0073aa;
    padding: 0;
    min-width: auto;
    box-shadow: none;
}

.ic-countdown[data-format="compact"] .ic-timer span::after {
    content: ':';
    margin-left: 5px;
    color: #666;
}

.ic-countdown[data-format="compact"] .ic-timer span:last-child::after {
    display: none;
}

/* Minimal Format */
.ic-countdown[data-format="minimal"] .ic-minutes,
.ic-countdown[data-format="minimal"] .ic-seconds {
    display: none;
}

/* Color Schemes */
.ic-scheme-red {
    border-color: #dc3232 !important;
}

.ic-scheme-red::before {
    background: linear-gradient(90deg, #dc3232, #e65054) !important;
}

.ic-scheme-red .ic-timer span {
    background: #dc3232 !important;
    box-shadow: 0 2px 4px rgba(220, 50, 50, 0.3) !important;
}

.ic-scheme-red .ic-timer span:hover {
    box-shadow: 0 4px 8px rgba(220, 50, 50, 0.4) !important;
}

.ic-scheme-green {
    border-color: #46b450 !important;
}

.ic-scheme-green::before {
    background: linear-gradient(90deg, #46b450, #64c470) !important;
}

.ic-scheme-green .ic-timer span {
    background: #46b450 !important;
    box-shadow: 0 2px 4px rgba(70, 180, 80, 0.3) !important;
}

.ic-scheme-green .ic-timer span:hover {
    box-shadow: 0 4px 8px rgba(70, 180, 80, 0.4) !important;
}

.ic-scheme-orange {
    border-color: #ffb900 !important;
}

.ic-scheme-orange::before {
    background: linear-gradient(90deg, #ffb900, #ffcc44) !important;
}

.ic-scheme-orange .ic-timer span {
    background: #ffb900 !important;
    box-shadow: 0 2px 4px rgba(255, 185, 0, 0.3) !important;
}

.ic-scheme-orange .ic-timer span:hover {
    box-shadow: 0 4px 8px rgba(255, 185, 0, 0.4) !important;
}

.ic-scheme-dark {
    border-color: #333 !important;
    background: #2c2c2c !important;
    color: #fff !important;
}

.ic-scheme-dark::before {
    background: linear-gradient(90deg, #333, #555) !important;
}

.ic-scheme-dark h3 {
    color: #fff !important;
}

.ic-scheme-dark p {
    color: #ccc !important;
}

.ic-scheme-dark .ic-timer span {
    background: #333 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.ic-scheme-dark .ic-timer span:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ic-countdown {
        padding: 20px;
        margin: 15px 0;
        max-width: 100% !important;
    }
    
    .ic-countdown h3 {
        font-size: 20px;
    }
    
    .ic-timer {
        gap: 15px;
    }
    
    .ic-timer span {
        font-size: 18px;
        padding: 10px 15px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .ic-countdown {
        padding: 18px;
        max-width: 100% !important;
    }
    
    .ic-countdown h3 {
        font-size: 18px;
    }
    
    .ic-countdown p {
        font-size: 13px;
    }
    
    .ic-timer {
        gap: 12px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ic-timer span {
        font-size: 16px;
        padding: 8px 12px;
        min-width: 65px;
        max-width: 80px;
    }
}

/* Animation for countdown updates */
.ic-countdown .ic-timer span.updating {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* RTL Support */
.rtl .ic-countdown {
    text-align: right;
}

.rtl .ic-timer {
    flex-direction: row-reverse;
}

/* Print Styles */
@media print {
    .ic-countdown {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .ic-countdown::before {
        background: #000 !important;
    }
    
    .ic-timer span {
        background: #000 !important;
        color: #fff !important;
    }
}