/* Hide default WooCommerce expiry date field */
.form-field.expiry_date_field {
    display: none !important;
}

/* Coupon schedule container (top of General tab) */
#coupon-schedule-fields {
    padding: 15px 15px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 15px;
     /*   background: #f9f9f9;*/

    /* FIX: prevent shifting */
    box-sizing: border-box;
}

/* Enable checkbox styling */
#coupon-schedule-fields > .form-field:first-child {
    width: 100%;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Schedule fields wrapper */
#easycoupon-schedule-fields-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    transition: opacity 0.3s ease;
}

/* Disabled state styling */
#easycoupon-schedule-fields-wrapper.easycoupon-disabled {
    opacity: 0.5;
    pointer-events: none;
}

#easycoupon-schedule-fields-wrapper input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Field layout */
#easycoupon-schedule-fields-wrapper .form-field {
    width: calc(50% - 10px);
    margin: 0 10px 20px 0;

    /* FIX: remove float-based layout */
    float: none;
    clear: none;
    box-sizing: border-box;
}

/* Remove right margin for every second field */
#easycoupon-schedule-fields-wrapper .form-field:nth-child(2n) {
    margin-right: 0;
}

/* Time input appearance */
#easycoupon-schedule-fields-wrapper input[type="time"] {
    width: 120px !important;
    padding: 4px 6px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: #fff;
}

/* Datepicker input consistency */
#easycoupon-schedule-fields-wrapper input.date-picker {
    width: 140px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    #easycoupon-schedule-fields-wrapper {
        flex-direction: column;
    }

    #easycoupon-schedule-fields-wrapper .form-field {
        width: 100%;
        margin-right: 0;
    }
}

/* -------------------------------------------------------------------------
   Timezone notice — displayed above the Valid from time field
   ------------------------------------------------------------------------- */

.easycoupon-timezone-notice {
    width: 100%;
    background: #fff8e5;
    border: 1px solid #f0c33c;
    border-left: 4px solid #f0c33c;
    border-radius: 3px;
    padding: 8px 12px;
    margin: 0 0 14px 0;
    font-size: 12px;
    color: #3c434a;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    box-sizing: border-box;
}

.easycoupon-timezone-notice .dashicons {
    color: #b8860b;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.easycoupon-timezone-notice a {
    color: #2271b1;
    text-decoration: underline;
    font-weight: 600;
}

.easycoupon-timezone-notice a:hover {
    color: #135e96;
}

/* -------------------------------------------------------------------------
   jonthornton jQuery Timepicker overrides
   Ensures the timepicker dropdown matches the WooCommerce admin UI style
   and that the time input field looks consistent with the date-picker fields.
   ------------------------------------------------------------------------- */

/* Make the timepicker input look identical to the date-picker inputs */
#coupon_valid_from_time,
#easy_sct_sale_end_time {
    width: 120px !important;
    padding: 4px 6px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    line-height: 1.5;
    color: #3c434a;
    cursor: pointer;
}

#coupon_valid_from_time:focus,
#easy_sct_sale_end_time:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Timepicker dropdown list */
.ui-timepicker-wrapper {
    border: 1px solid #ccd0d4 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-size: 13px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    background: #fff !important;
    z-index: 99999 !important;
}

.ui-timepicker-list li {
    padding: 5px 12px !important;
    color: #1d2327 !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
}

.ui-timepicker-list li:hover,
.ui-timepicker-list .ui-timepicker-selected {
    background: #2271b1 !important;
    color: #fff !important;
}
