/* =========================================================
   CF7 MARATHON OTP
   Domestic / International Verification
   ========================================================= */


/* =========================================================
   MAIN OTP CONTAINER
   ========================================================= */

.marathon-otp-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    box-sizing: border-box;
}


/* =========================================================
   PARTICIPANT TYPE SELECTOR
   ========================================================= */

.marathon-participant-selector {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-bottom: 25px;
    box-sizing: border-box;
}


/*
 * Hide the actual radio buttons.
 */
.marathon-participant-selector input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


/*
 * Participant labels.
 */
.marathon-participant-selector label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    padding: 12px 18px;

    border: 1px solid #d9d9d9;
    border-radius: 8px;

    background: #ffffff;
    color: #333333;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    text-align: center;

    box-sizing: border-box;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}


/*
 * Hover.
 */
.marathon-participant-selector label:hover {
    border-color: #0073aa;
}


/*
 * Selected participant.
 */
.marathon-participant-selector
input[type="radio"]:checked
+ label {
    background: #0073aa;
    border-color: #0073aa;
    color: #ffffff;

    box-shadow:
        0 3px 10px rgba(0, 115, 170, 0.18);
}


/* =========================================================
   FIELD GROUP
   ========================================================= */

.otp-field-group {
    width: 100%;
    margin-bottom: 18px;
    box-sizing: border-box;
}


/*
 * Labels.
 */
.otp-field-group label {
    display: block;

    margin-bottom: 7px;

    color: #333333;

    font-size: 14px;
    font-weight: 600;
}


/*
 * Inputs.
 */
.otp-field-group input[type="text"],
.otp-field-group input[type="tel"],
.otp-field-group input[type="email"],
.otp-field-group input[type="number"] {
    width: 100%;

    min-height: 46px;

    padding: 11px 13px;

    border: 1px solid #d4d4d4;
    border-radius: 6px;

    background: #ffffff;

    color: #222222;

    font-size: 15px;

    outline: none;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/*
 * Input focus.
 */
.otp-field-group input:focus {
    border-color: #0073aa;

    box-shadow:
        0 0 0 2px rgba(0, 115, 170, 0.12);
}


/*
 * Readonly inputs after verification.
 */
.otp-field-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}


/* =========================================================
   OTP INPUT
   ========================================================= */

#otp {
    max-width: 250px;

    letter-spacing: 6px;

    text-align: center;

    font-size: 20px;
    font-weight: 600;
}


/* =========================================================
   BUTTONS
   ========================================================= */

#send-otp,
#verify-otp {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 44px;

    margin-top: 5px;

    padding: 10px 18px;

    border: none;
    border-radius: 6px;

    background-color: #0073aa;
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    line-height: 1.2;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background-color 0.2s ease,
        opacity 0.2s ease,
        transform 0.1s ease;
}


/*
 * Verify button spacing.
 */
#verify-otp {
    margin-left: 8px;
}


/*
 * Hover.
 */
#send-otp:hover:not(:disabled),
#verify-otp:hover:not(:disabled) {
    background-color: #005177;
}


/*
 * Click.
 */
#send-otp:active:not(:disabled),
#verify-otp:active:not(:disabled) {
    transform: translateY(1px);
}


/*
 * Disabled.
 */
#send-otp:disabled,
#verify-otp:disabled {
    background-color: #a0a5aa;

    color: #ffffff;

    cursor: not-allowed;

    opacity: 0.75;
}


/* =========================================================
   OTP MESSAGE
   ========================================================= */

.otp-message {
    display: block;

    margin-top: 7px;
    margin-bottom: 10px;

    font-size: 13px;
    font-weight: 500;

    line-height: 1.5;

    min-height: 0;
}


/*
 * Success message.
 *
 * JS changes the text color, but this gives
 * success messages a clean appearance.
 */
.otp-message:not(:empty) {
    word-break: break-word;
}


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

#submit-btn[disabled] {
    opacity: 0.5;

    cursor: not-allowed;

    pointer-events: none;
}


/*
 * Enabled submit button.
 */
#submit-btn:not(:disabled) {
    cursor: pointer;
}


/* =========================================================
   ERROR MESSAGE FROM CONTACT FORM 7
   ========================================================= */

.wpcf7-not-valid-tip {
    margin-top: 5px;

    font-size: 13px;
}


/* =========================================================
   MOBILE RESPONSIVE
   ========================================================= */

@media (max-width: 600px) {

    .marathon-otp-wrapper {
        max-width: 100%;
        padding: 0 5px;
    }


    /*
     * Stack participant buttons.
     */
    .marathon-participant-selector {
        flex-direction: column;
        gap: 10px;
    }


    .marathon-participant-selector label {
        width: 100%;
        min-height: 48px;
    }


    /*
     * Full-width buttons on mobile.
     */
    #send-otp,
    #verify-otp {
        width: 100%;

        margin-left: 0;
        margin-right: 0;

        margin-top: 8px;
    }


    /*
     * OTP input.
     */
    #otp {
        max-width: 100%;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .marathon-participant-selector label {
        font-size: 14px;
        padding: 10px 12px;
    }


    #send-otp,
    #verify-otp {
        font-size: 13px;
        padding: 9px 12px;
    }

}