/* ==========================================================================
   Countdown Calculator - Local Styles

   Calculator-specific styles only. Base styles are in /shared/css/base.css
   ========================================================================== */

/* ==========================================================================
   Form Styling
   ========================================================================== */

/* Form label styling */
.form-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

/* Form input styling */
.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: all 0.2s;
    color: #333;
}

.form-input:hover {
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

/* ==========================================================================
   Date and Time Input Styling
   ========================================================================== */

input[type="date"],
input[type="time"] {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 44px;
    font-size: 16px;
    color: #333;
    width: 100%;
    position: relative;
    display: block;
}

input[type="date"]:not(:focus):not(:valid),
input[type="time"]:not(:focus):not(:valid) {
    color: #666;
}

input[type="date"]:not(:focus):not(:valid)::before,
input[type="time"]:not(:focus):not(:valid)::before {
    content: attr(placeholder);
    color: #666;
    width: 100%;
}

/* Calendar/clock picker indicator styling */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    position: absolute;
    right: 8px;
    height: 20px;
    width: 20px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input[type="date"]:focus,
input[type="time"]:focus {
    outline: none;
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

/* ==========================================================================
   Quick Presets Grid
   ========================================================================== */

.presets-group {
    margin-top: 8px;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.preset-btn {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #003049;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.preset-btn:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.preset-btn:active {
    background: #bae6fd;
}

.preset-btn.active {
    background: #003049;
    color: white;
    border-color: #003049;
}

/* ==========================================================================
   Live Countdown Display
   ========================================================================== */

.countdown-section {
    background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.live-countdown {
    text-align: center;
}

.countdown-status {
    font-size: 14px;
    font-weight: 500;
    color: #003049;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-status.past {
    color: #b91c1c;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.countdown-value {
    font-size: 32px;
    font-weight: 700;
    color: #003049;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Results Styling
   ========================================================================== */

.results-section-title {
    color: #003049;
    font-weight: 500;
    margin-bottom: 8px;
}

.results-item {
    color: #003049;
    font-size: 16px;
}

.results-total {
    padding: 16px 0 0 0;
    background: none;
    border-top: 1px solid #bae6fd;
    margin-top: 16px;
}

.date-summary {
    margin-bottom: 8px;
    color: #003049;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.date-summary .results-value {
    color: #003049;
    display: block;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section {
    margin-top: 32px;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    color: #003049;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 640px) {
    .faq-section {
        padding: 16px;
        margin-top: 24px;
    }

    .faq-section h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    input[type="date"],
    input[type="time"] {
        background-color: #ffffff;
        border: 1px solid #ddd;
    }

    input[type="date"]::-webkit-datetime-edit-text,
    input[type="date"]::-webkit-datetime-edit-month-field,
    input[type="date"]::-webkit-datetime-edit-day-field,
    input[type="date"]::-webkit-datetime-edit-year-field,
    input[type="time"]::-webkit-datetime-edit-hour-field,
    input[type="time"]::-webkit-datetime-edit-minute-field,
    input[type="time"]::-webkit-datetime-edit-ampm-field {
        color: #333;
    }

    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .countdown-timer {
        gap: 8px;
    }

    .countdown-unit {
        min-width: 60px;
        padding: 10px;
    }

    .countdown-value {
        font-size: 24px;
    }

    .countdown-label {
        font-size: 10px;
    }
}

@media (max-width: 380px) {
    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .preset-btn {
        padding: 8px 6px;
        font-size: 13px;
    }

    .countdown-unit {
        min-width: 50px;
        padding: 8px;
    }

    .countdown-value {
        font-size: 20px;
    }
}
