/* Fix payment block to be full width like other sections */
.hikashop_checkout_page.hikashop_checkout_page_step1>div:nth-of-type(1) .hikashop_checkout_payment {
    align-items: flex-start;
    margin-bottom: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}
.view-checkout:has(.checkoutRegisterForm) {
    .hikashop_checkout_page.hikashop_checkout_page_step1>div:nth-of-type(1) .hikashop_checkout_payment {
    display: none !important;
}
}


/* Style the Payment Method legend as h3 with numbering */
.hikashop_checkout_page.hikashop_checkout_page_step1>div:nth-of-type(1) .hikashop_checkout_payment legend {
    font-size: 1.3rem;
    font-weight: bold;
    color: #252525;
    margin: 0;
    padding: 0;
    border: none;
    width: 200px;
    flex-shrink: 0;
    float: none;
}

/* Add "2. " before Payment Method */
.hikashop_checkout_page.hikashop_checkout_page_step1>div:nth-of-type(1) .hikashop_checkout_payment legend:before {
    content: "2. ";
}

/* Payment content wrapper */
.hikashop_checkout_page.hikashop_checkout_page_step1>div:nth-of-type(1) .hikashop_checkout_payment > *:not(legend) {
    flex: 1;
}

/* Style the payment dropdown selector */
.hikashop_checkout_page.hikashop_checkout_page_step1>div:nth-of-type(1) .hikashop_checkout_payment .hika_payment_field select {
    width: 100%;
    max-width: 300px;
    margin-bottom: 1rem;
}

/* NUCLEAR OPTION: Hide any floating credit card forms and show them in the right place */
div[id*="hikashop_checkout_payment_"][id*="__card"] {
    position: static !important;
    display: block !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    margin: 20px 0 !important;
    padding: 0 !important;
}

/* Target the specific credit card container ID pattern */
div[id*="hikashop_checkout_payment_"][id*="__card"] * {
    position: static !important;
    float: none !important;
}

/* Reset all hika_options containers globally */
.hika_options.large {
    position: static !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hika_options.large dt {
    position: static !important;
    display: block !important;
    width: auto !important;
    float: none !important;
    margin: 15px 0 5px 0 !important;
    padding: 0 !important;
    font-weight: normal !important;
    text-align: left !important;
    clear: both !important;
}

.hika_options.large dd {
    position: static !important;
    display: block !important;
    width: auto !important;
    float: none !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    clear: both !important;
}

/* Reset all input fields in credit card forms */
.hika_options.large input[type="text"] {
    position: static !important;
    display: inline-block !important;
    width: 200px !important;
    padding: 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    background: white !important;
    margin: 0 !important;
    float: none !important;
    z-index: auto !important;
    pointer-events: auto !important;
}

/* Expiration date inputs - put them side by side */
.hika_options.large .card_expiration_date_input {
    width: 50px !important;
    text-align: center !important;
    margin-right: 10px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Target the expiration date container to keep inputs inline */
.hika_options.large dd:has(.card_expiration_date_input) {
    display: block !important;
    white-space: nowrap !important;
}

/* Alternative targeting for the expiration date inputs by placeholder */
.hika_options.large input[placeholder="mm"],
.hika_options.large input[placeholder="MM"] {
    width: 50px !important;
    text-align: center !important;
    margin-right: 10px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.hika_options.large input[placeholder="YY"],
.hika_options.large input[placeholder="yy"] {
    width: 50px !important;
    text-align: center !important;
    margin-left: 10px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Target any input that comes after a "/" to make it smaller */
.hika_options.large dd input[type="text"] + input[type="text"] {
    width: 50px !important;
    margin-left: 10px !important;
}

/* Reset credit card form selects */
.hika_options.large select {
    position: static !important;
    display: inline-block !important;
    width: 200px !important;
    padding: 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background: white !important;
}

/* Submit button reset */
.hikashop_checkout_payment_submit {
    position: static !important;
    margin-top: 20px !important;
    clear: both !important;
    display: block !important;
}

.hikashop_checkout_payment_submit button {
    background: #fcd412 !important;
    color: #252525 !important;
    border: 2px solid #fcd412 !important;
    border-radius: 100vh !important;
    padding: 8px 20px !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

/* Try to override any existing HikaShop CSS that might be positioning the forms */
.hikashop_checkout_page .hikashop_checkout_payment_card {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}

/* Hide any incorrectly positioned credit card forms */
body > div[id*="hikashop_checkout_payment_"][style*="position"],
body > div[id*="card"][style*="position"] {
    display: none !important;
}