/* Hide the entire Country row (label + dropdown + spacing) in J2Commerce checkout */
.control-group:has(select#country_id) {
    display: none !important;
}
/* =========================================================
   Clean, Compact 2-Column Checkout Styling for J2Commerce
   ========================================================= */

/* Wrap checkout inside a clean, centered card */
#j2store-checkout,
.j2store-checkout {
    max-width: 820px;
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 4px 14px rgba(15, 45, 82, 0.06);
}

/* Style the accordion step bars (Checkout Options, Billing, Shipping, Payment) */
.checkout-heading {
    background: #0f355e !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    margin-bottom: 14px !important;
}
.checkout-heading a {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Put Billing/Shipping form fields into a clean 2-column grid */
#billing-new,
#shipping-new,
#guest-checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 10px;
}

/* Make Address Line 1, Address Line 2, checkbox, and Continue button span full width */
#billing-new .control-group:has(#address_1),
#billing-new .control-group:has(#address_2),
#shipping-new .control-group:has(#address_1),
#shipping-new .control-group:has(#address_2),
#billing-new > label,
#billing-new > input[type="button"],
#shipping-new > input[type="button"] {
    grid-column: 1 / -1;
}

/* Tighten vertical spacing and put the red asterisk inline next to the label */
#j2store-checkout .control-group {
    margin-bottom: 6px !important;
}
#j2store-checkout .control-label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px !important;
    font-weight: 600;
    font-size: 0.92rem;
    color: #1f2933;
}
#j2store-checkout .control-label br {
    display: none;
}

/* Compact, crisp input boxes matching your site's blue palette */
#j2store-checkout input[type="text"],
#j2store-checkout input[type="email"],
#j2store-checkout input[type="tel"],
#j2store-checkout input[type="password"],
#j2store-checkout select,
#j2store-checkout textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 12px !important;
    font-size: 0.95rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    background-color: #f8fafc !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#j2store-checkout input:focus,
#j2store-checkout select:focus {
    background-color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15) !important;
    outline: none !important;
}

/* Mobile responsiveness: stack back to 1 column on phones */
@media (max-width: 640px) {
    #billing-new,
    #shipping-new,
    #guest-checkout {
        grid-template-columns: 1fr;
    }
}
