:root {
    --arb_first_color: #59b210;
    /* your brand green */
}

#arb_pre_order {
    padding: 15px;
    background: #f6f6f6;
    margin-top: 10px;
}

/* --- Heading --- */
.pre_order {
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    font-family: "Ubuntu", sans-serif;
    color: #333;
    margin-bottom: 10px;
}

/* --- Fields layout --- */
.fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    margin: 0 auto 1.5rem;
}

/* Inputs */
.fields input[type="text"],
.fields input[type="email"],
.fields input[type="tel"] {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ececec;
}

.fields input:focus {
    border-color: var(--arb_first_color);
    box-shadow: 0 0 0 2px rgba(89, 178, 16, 0.2);
    outline: none;
}

/* --- Radio buttons --- */
.contact-method {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}

.contact-method label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1.8rem;
    font-size: 0.95rem;
    cursor: pointer;
    color: #333;
}

/* Hide native input */
.contact-method input[type="radio"] {
    position: absolute;
    opacity: 0;
}

/* Custom radio */
.contact-method label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid var(--arb_first_color);
    border-radius: 50%;
    background-color: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Checked */
.contact-method input[type="radio"]:checked+span {
    color: var(--arb_first_color);
    font-weight: 500;
}

.contact-method input[type="radio"]:checked+span::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: var(--arb_first_color);
    border-radius: 50%;
}

/* --- Error --- */
#pre-err {
    text-align: center;
    color: #d63638;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* --- Submit button --- */
#pre_submit {
    padding: 5px 18px;
    border: 0;
    background: #23b55c;
    background-color: rgb(35, 181, 92);
    color: #fff;
    position: relative;
    font: 400 14px/30px "Ubuntu", sans-serif;
    text-transform: uppercase;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
    width: 100%;
}

#pre_submit:hover {
    background-color: #4da010;
    transform: translateY(-1px);
}

#pre_submit:active {
    transform: translateY(0);
}

/* --- Loader --- */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--arb_first_color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .fields {
        width: 100%;
        padding: 0 1rem;
    }

    .contact-method {
        flex-direction: column;
        align-items: flex-start;
    }

    #pre_submit {
        font-size: 0.95rem;
    }
}

/* --- Out of stock message --- */
.stock.out-of-stock {
    background-color: #fff6f6;
    border: 1px solid var(--alert_red);
    border-left: 5px solid var(--alert_red);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    max-width: 500px;
    margin: 1rem auto 2rem;
    text-align: center;
    font-family: inherit;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stock.out-of-stock b {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--alert_red);
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stock.out-of-stock span {
    font-size: 0.95rem;
    color: #555;
}

/* --- Optional: subtle fade-in animation --- */
.stock.out-of-stock {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* --- Success Message --- */
.pre-success {
    display: none;
    /* hidden by default */
    background-color: #f6fff1;
    border: 1px solid var(--arb_first_color);
    border-left: 5px solid var(--arb_first_color);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    max-width: 500px;
    margin: 1.5rem auto;
    text-align: center;
    color: #2e5305;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.4s ease-in-out;
}

/* --- Fade-in animation --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}