/* === Military Time Converter Styles === */
.mtc-calculator-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    box-shadow: rgba(149, 157, 165, .2) 0px 8px 24px;
}

/* Left panel: input and settings */
.mtc-panel-left {
    flex: 1 1 300px;
    background: #fff;
    padding: 2rem;
    color: #1f2847;
}
.mtc-form-group {
    margin-bottom: 1em;
}
.mtc-form-group label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5em;
}
.mtc-form-group select,
.mtc-form-group input[type='text'] {
    width: 100%;
    padding: 0.5em;
    margin-bottom: 0.3em;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.mtc-button {
    background: #102c4e;
    color: #fff;
    border: none;
    padding: 0.6em 1em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
.mtc-button:hover {
    background: #005d8c;
}

/* Right panel: results */
.mtc-panel-right {
    flex: 1 1 300px;
    background: #102c4e;
    border: 1px solid #eaeaea;
    padding: 2rem;
    color: #fff;
}
.mtc-result-group {
    margin-bottom: 1em;
}
.mtc-result-group p {
    margin: 0.5em 0;
}
.mtc-result-group strong {
    display: inline-block;
    width: 150px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mtc-calculator-container {
        flex-direction: column;
    }
    .mtc-panel-right {
        flex: auto;
    }
}

.mtc-time-input {
    width: 100%;
    padding: 0.5em;
    margin-bottom: 0.3em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

/* Ensure consistent styling across browsers */
.mtc-time-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 0.2em;
}

/* AM/PM Toggle Switch Styles */
.mtc-toggle-switch {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5em 0;
}

.mtc-toggle-label {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 34px;
}

.mtc-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mtc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2196F3;
    transition: .4s;
    border-radius: 34px;
}

.mtc-toggle-slider:before {
    position: absolute;
    content: "AM";
    height: 26px;
    width: 35px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    text-align: center;
    line-height: 26px;
    font-size: 12px;
    font-weight: bold;
}

.mtc-toggle-input:checked + .mtc-toggle-slider {
    background-color: #0073aa;
}

.mtc-toggle-input:checked + .mtc-toggle-slider:before {
    transform: translateX(37px);
    content: "PM";
}

/* Time input with toggle layout */
.mtc-time-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mtc-time-input-wrapper {
    flex: 1;
}

.military-time-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0.5em;
}

.military-time-part {
    width: 3em;
    padding: 0.5em;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.time-separator {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Remove spinner buttons from number inputs */
.military-time-part::-webkit-inner-spin-button,
.military-time-part::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Flatpickr customization */
.flatpickr-input {
    width: 100%;
    padding: 0.5em;
    margin-bottom: 0.75em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.flatpickr-time {
    border-radius: 4px;
    margin: 0.5em 0;
}

/* Make the time picker more visible */
.flatpickr-time input {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Style AM/PM toggle for standard time */
.flatpickr-am-pm {
    font-size: 1rem;
    font-weight: bold;
    color: #0073aa;
}
