/**
 * Frontend styles for ABT Countdown Timer
 * Styled to match the design with black boxes, white numbers, and better alignment
 */

/* Main wrapper */
.abt-cdt-timer {
    margin: 30px 0;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Header message */
.promotion-timer-header {
    margin-bottom: 20px;
    text-align: center;
}

.timer-message {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    text-align: center;
    display: block;
    margin: 0;
    padding: 0;
}

/* Countdown container */
.abt-cdt-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

/* Countdown unit (Days, Hours, etc.) */
.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Digits container (two digits side by side) */
.countdown-digits {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

/* Individual digit box - black digital background */
.countdown-digit-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    background: #000000;
    border: none;
    border-radius: 4px;
    min-width: 36px;
    width: 36px;
    height: 44px;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Digit value (white text) */
.countdown-digit-box .countdown-value {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Separator (colon) */
.countdown-separator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #000000;
    line-height: 1;
    margin: 0 3px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    height: 44px;
    vertical-align: middle;
}

/* Unit labels */
.countdown-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #000000;
    text-align: center;
    display: block;
    margin: 0;
    padding: 0;
    text-transform: none;
    letter-spacing: 0;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .abt-cdt-timer {
        margin: 20px 0;
    }
    
    .timer-message {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .abt-cdt-countdown {
        gap: 6px;
    }
    
    .countdown-digits {
        gap: 3px;
    }
    
    .countdown-digit-box {
        min-width: 30px;
        width: 30px;
        height: 38px;
        padding: 0;
        border-radius: 3px;
    }
    
    .countdown-digit-box .countdown-value {
        font-size: 22px;
    }
    
    .countdown-separator {
        font-size: 22px;
        height: 38px;
        margin: 0 2px;
    }
    
    .countdown-label {
        font-size: 11px;
    }
    
    .countdown-unit {
        gap: 6px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .timer-message {
        font-size: 13px;
    }
    
    .countdown-digit-box {
        min-width: 26px;
        width: 26px;
        height: 34px;
        padding: 0;
    }
    
    .countdown-digit-box .countdown-value {
        font-size: 20px;
    }
    
    .countdown-separator {
        font-size: 20px;
        height: 34px;
    }
    
    .countdown-label {
        font-size: 10px;
    }
}

/* Ensure timer displays correctly across all themes */
.abt-cdt-timer * {
    box-sizing: border-box;
}

/* Override any theme styles that might interfere */
.abt-cdt-timer {
    clear: both;
    position: relative;
}

/* Force black background on digit boxes - prevent theme overrides */
.countdown-digit-box {
    background-color: #000000 !important;
    background: #000000 !important;
    border: none !important;
}

/* Force white text on digits - prevent theme overrides */
.countdown-digit-box .countdown-value {
    color: #ffffff !important;
}

/* Ensure digit boxes maintain their black background */
.countdown-digit-box:hover,
.countdown-digit-box:focus,
.countdown-digit-box:active {
    background-color: #000000 !important;
    background: #000000 !important;
}

/* Ensure proper spacing in WooCommerce product summary */
.woocommerce div.product .abt-cdt-timer {
    margin: 20px 0;
    clear: both;
}

/* Compatibility with common WooCommerce themes */
.single-product .abt-cdt-timer,
.product .abt-cdt-timer {
    width: 100%;
    max-width: 100%;
}
