/* ---------------------------------------- */
/* Checkout wrapper: left and right columns */
.checkout-wrapper {
    display: flex;
    gap: 2rem; /* spacing between columns */
}

/* ---------------------------------------- */
/* LEFT COLUMN: Accordion container */
.checkout-left {
    flex: 1 1 60%; /* ~60% width */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
}

/* Accordion item */
.accordion-item {
    background: #fff; /* content background */
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

/* Accordion header */
.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.5rem 1.25rem; /* reduced vertical padding */
    font-weight: 700;
    font-size: 1.625rem; /* 30% larger than base */
    background: #fefefe; /* collapsed header background */
    cursor: pointer;
    border: none;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f3f4f6;
}

/* Arrow indicator */
.accordion-header::after {
    content: "^";
    font-size: 2rem; /* larger arrow */
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

/* Rotate arrow when expanded */
.accordion-item.expanded .accordion-header::after {
    transform: rotate(180deg);
}

/* Accordion content */
.accordion-item .accordion-content {
    display: none;
    padding: 1rem 1.25rem;
    background: #fff;
}

.accordion-item.expanded .accordion-content {
    display: block;
}

/* ---------------------------------------- */
/* Enrolment step navigation and form */
#enrolment-step-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#enrolment-step-navigation .step-button {
    width: 100%; /* full width */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    font-size: 1.5rem;
}

#enrolment-step-navigation .step-button:hover {
    border-color: #a5133a;
}

.step-button:hover { background: #f3f4f6; border-color: #a5133a; }
.step-button.active { border-color: #2563eb; background: #2563eb; color: black; }
.step-button.completed { border-color: #16a34a; background: #16a34a; color: #fff; }

/* Back button above form */
.back-btn {
    margin-bottom: 1rem;
    padding: 1.5rem 1.5rem;
    border-radius: 0.5rem;
    border: 2px solid #a5133a;
    background: #a5133a;
    color: white;;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.5rem
}

.back-btn:hover { 
    background: white;
    border: 2px solid #a5133a;
    color: black;;
 }

/* ---------------------------------------- */
/* Payment options styling */
/* Payment methods container */
#payment-options-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Payment method wrapper */
.payment-method {
    display: flex;
    align-items: center;            /* <-- Align radio + label vertically */
    justify-content: flex-start;    /* <-- Keep everything left-aligned */
    gap: 0.75rem;                   /* Spacing between radio + label */
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
    transition: border 0.2s, background 0.2s;
}

/* Highlight on hover */
.payment-method:hover {
    border-color: #2563eb;
    background: #f9fafb;
}

/* Radio button styling */
.payment-method input[type="radio"] {
    margin: 0;                      /* Remove WP/WC default margins */
    transform: scale(1.3);          /* Make radio button slightly larger */
    cursor: pointer;
}

/* Ensure label text aligns properly */
.payment-method label {
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

/* Optional description under method name */
.payment-description {
    font-size: 0.95rem;
    font-weight: 400;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ---------------------------------------- */
/* RIGHT COLUMN: Order Summary */
.checkout-right {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checkout-summary-section {
    padding: 1.5rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Cart items */
.cart-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Cart items text - 50% larger */
.cart-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    line-height: normal;
    font-size: 1.5rem; /* 50% larger */
    font-weight: 500;
    color: #111827;
}

.cart-item:not(:last-of-type){
    border-bottom: 1px solid #e5e7eb;
}

.cart-item-price-checkout{
    width: 100%;
    text-align: right;
    font-size: 1.125rem;
    font-weight: 700;
}

.cart-item .product-name {
    font-size: 1.5rem;
    font-weight: 500;
}

.cart-item .product-quantity {
    font-size: 1.5rem;
    font-weight: 500;
    color: #6b7280;
}

.summary-title, .instalments-title, .auth-title{
    font-family: "Gotham";
}

.instalments-summary{
    border-top: 1px solid #ddd;
    padding-top: 2rem;
}

.instalment_breakdown{
    font-size: 1rem !important;
    margin-bottom: 0px;
}

/* Totals section */
.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 18px;
    padding-top: 1rem;
    color: #111827;
    border-top: 1px solid #ddd;
}

/* Checkout button */
.checkout-btn, .login-btn {
    width: 100%;
    padding: 1.5rem 0; /* larger height */
    border-radius: 0.75rem;
    font-size: 1.5rem; /* larger text */
    font-weight: 700; /* bolder text */
    border: 2px solid #a5133a;
    text-align: center; /* center text */
    background-color: #a5133a !important;
    transition: background 0.2s, color 0.2s, transform 0.1s;
}

/* Enabled state */
.checkout-btn:enabled {
    background: #16a34a;
    color: #fff;
    cursor: pointer;
}

/* Enabled hover */
.checkout-btn:enabled:hover, .login-btn:hover {
    background-color: white !important;
    color: black !important;
    border: 2px solid #a5133a !important;
}

/* Disabled state */
.checkout-btn:disabled {
    background: #9ca3af;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ---------------------------------------- */
/* Mobile Optimization */
@media (max-width: 767px) {
    .checkout-wrapper {
        flex-direction: column;
    }

    .checkout-left,
    .checkout-right {
        max-height: none;
        overflow: visible;
    }

    #enrolment-form-container {
        max-height: 70vh;
        overflow-y: auto;
        padding-right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .accordion-header {
        padding: 1.5rem 1rem;
        font-size: 1.35rem;
    }

    .step-button {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ---------------------------------------- */
/* Compact billing form fields */
#billing-address-form {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

#billing-address-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Smaller fields but larger text */
#billing-address-form .form-row input,
#billing-address-form .form-row select,
#billing-address-form .form-row textarea {
    padding: 0 !important; /* 30% smaller vertical/horizontal padding */
    padding-left: 0.5rem !important;
    font-size: 1.25rem; /* larger input/placeholder text */
    border-radius: 0.4rem;
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
    line-height: 40px !important;
    transition: border 0.2s, background 0.2s;
}

/* Placeholder text larger */
#billing-address-form .form-row input::placeholder,
#billing-address-form .form-row textarea::placeholder,
#billing-address-form .form-row select::placeholder {
    font-size: 1.25rem;
    color: #9ca3af;
}

/* Focus state */
#billing-address-form .form-row input:focus,
#billing-address-form .form-row select:focus,
#billing-address-form .form-row textarea:focus {
    border-color: #2563eb;
    outline: none;
    background: #f9fafb;
}

/* Labels */
#billing-address-form label {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.1rem;
    color: #111827;
}

/* Required field asterisk */
#billing-address-form .required {
    color: #a5133a;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #billing-address-form .form-row input,
    #billing-address-form .form-row select,
    #billing-address-form .form-row textarea {
        padding: 0 !important;
        font-size: 1.1rem;
    }

    #billing-address-form label {
        font-size: 0.95rem;
    }
}

.woocommerce-input-wrapper{
    margin-block-start: 0.1rem !important;
}

.woocommerce form .form-row label {
    font-size: 0;
    white-space: normal !important;
}

.gf_page_steps{
    display: none !important;
}

.gateway-description,
.instalment-message {
    font-size: 1.5rem;
    color: #555;
    margin-top: 0.25rem;
    margin-left: 28px;
}

.instalment-message a{
    color: #a5133a;
    text-decoration: underline;
}

/* PAYMENT OPTIONS */
/* -----------------------------
   Custom Payment Option Checkboxes
----------------------------- */
/* Remove bullet points from the list */
.custom-payment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Hide the native radio input */
.custom-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

/* Base style for payment option container */
.custom-payment-option {
    border: 2px solid #ddd; 
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: border 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

/* Custom radio circle */
.custom-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #111; 
}

.custom-radio-label .custom-radio {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #a5133a; 
    border-radius: 50%;
    margin-right: 0.5rem;
    position: relative;
    background: #fff;
}

/* Red dot for checked radio */
.custom-radio-label input[type="radio"]:checked + .custom-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #a5133a; 
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2px #fff; /* white border inside */
}

/* Highlight active option border (enabled only) */
.custom-payment-option:not(.disabled):has(input[type="radio"]:checked) {
    border-color: #a5133a;
}

/* Hover effect for enabled options */
.custom-payment-option:not(.disabled):hover {
    border-color: #a5133a;
}

/* Disabled payment option */
.custom-payment-option.disabled {
    opacity: 0.5;         /* fades the card */
    cursor: not-allowed;  
    pointer-events: none; /* disable hover / click */
}

/* Instalment unlock message (always visible, even if option is disabled) */
.instalment-unlock-message {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #333;
    background: #fff7f9;
    padding: 0.75rem 1rem;
    border-left: 4px solid #a5133a;
    border-radius: 0.5rem;
}

.instalment-unlock-message a {
    color: #a5133a;
    font-weight: 600;
    text-decoration: underline;
}

/* Gateway description under Pay in Full */
.gateway-description {
    margin-top: 0.5rem;
    font-size: 1.5rem;
    color: #555;
}

/* Optional: spacing inside the label text */
.custom-radio-label span {
    font-size: 1rem;
    line-height: 1.2;
}



/* -----------------------------
   Billing form styling
----------------------------- */
.woocommerce-checkout #billing-address-form input,
.woocommerce-checkout #billing-address-form select,
.woocommerce-checkout #billing-address-form textarea {
    border: 2px solid #ddd;
}

/* Optional: add red border for select2 / enhanced select fields */
.woocommerce-checkout #billing-address-form .select2-container--default.select2-container .select2-selection {
    border: 2px solid #ddd;
}

/* WooCommerce billing form fields: red border on focus */
.woocommerce-checkout #billing-address-form input:focus,
.woocommerce-checkout #billing-address-form select:focus,
.woocommerce-checkout #billing-address-form textarea:focus {
    border-color: #a5133a; /* your red color */
    outline: none; /* remove default outline */
    transition: border-color 0.2s;
}

/* Optional: add red border for select2 / enhanced select fields */
.woocommerce-checkout #billing-address-form .select2-container--default.select2-container--focus .select2-selection {
    border-color: #a5133a;
}

/* -----------------------------
   Gravity form styling
----------------------------- */
#gform_wrapper_3, 
#gform_wrapper_3 *,
#gform_wrapper_2,
#gform_wrapper_2 * {
  font-size: 1.5rem;
  line-height: normal;
  font-weight: 500;
}

#gform_2{
    margin-bottom: 1rem;
}

#gform_wrapper_3 h1, #gform_wrapper_3 h2, #gform_wrapper_3 h3, #gform_wrapper_3 h4, #gform_wrapper_3 h5,
#gform_wrapper_2 h1, #gform_wrapper_2 h2, #gform_wrapper_2 h3, #gform_wrapper_2 h4, #gform_wrapper_2 h5 {
    font-family: "Gotham";
}

#gform_wrapper_3 li, #gform_wrapper_2 li{
    margin-left: 1rem;
}

#gform_wrapper_3 .gform_required_legend, #gform_wrapper_2 .gform_required_legend{
    margin-top: 2rem;
}

#gform_wrapper_3 input, #gform_wrapper_3 select, #gform_wrapper_3 textarea,
#gform_wrapper_2 input, #gform_wrapper_2 select, #gform_wrapper_2 textarea {
    line-height: 40px;
    border: 2px solid #ddd;
}

#gform_wrapper_3 input:focus, #gform_wrapper_3 select:focus, #gform_wrapper_3 textarea:focus,
#gform_wrapper_2 input:focus, #gform_wrapper_2 select:focus, #gform_wrapper_2 textarea:focus {
    border-color: #a5133a;
    outline: none;
    transition: border-color 0.2s;
}

#gform_wrapper_3 label, #gform_wrapper_2 label, #gform_wrapper_3 .gfield_label, #gform_wrapper_2 .gfield_label {
    font-weight: 600;
    font-size: 1rem;
}

.gform_validation_errors{
    margin-bottom: 1rem;
}

#gform_wrapper_3 input[type="button"], #gform_wrapper_3 input[type="submit"],
#gform_wrapper_2 input[type="button"], #gform_wrapper_2 input[type="submit"] {
    background-color: #a5133a;
    color: white;
    border-radius: 0.5rem;
    font-weight: bold;
    border: 2px solid #a5133a;
}

#gform_wrapper_3 input[type="button"]:hover, #gform_wrapper_3 input[type="submit"]:hover,
#gform_wrapper_2 input[type="button"]:hover, #gform_wrapper_2 input[type="submit"]:hover {
    background-color: white;
    color: black;
    border: 2px solid #a5133a;
}

.gform-theme--foundation .gform_fields{
    gap: 15px !important;
}

#gform_wrapper_3 a, #gform_wrapper_2 a {
    color: #a5133a;
    text-decoration: underline;
}

/* Target all Gravity Forms radio buttons */
#gform_wrapper_3 .gfield-choice-input[type="radio"],
#gform_wrapper_2 .gfield-choice-input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #a5133a;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  outline: none;
}

/* The red "dot" when selected */
#gform_wrapper_3 .gfield-choice-input[type="radio"]:checked,
#gform_wrapper_2 .gfield-choice-input[type="radio"]:checked {
  border-color: #a5133a;
}

#gform_wrapper_3 .gfield-choice-input[type="radio"]:checked::before,
#gform_wrapper_2 .gfield-choice-input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #a5133a;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}


/* ---------------------------------- */
/* Login / Registration Form Styling  */
/* ---------------------------------- */

#login-register-container {
    max-height: 60vh; /* adjust as needed */
    overflow-y: scroll;
    padding: 0rem;
}

/* Container */
#morley-login-form,
#morley-registration-form {
    padding: 0rem;
    margin: 1rem auto;
}

/* Form fields */
#morley-login-form input[type="text"],
#morley-login-form input[type="password"],
#morley-login-form input[type="email"],
#morley-registration-form input[type="text"],
#morley-registration-form input[type="email"],
#morley-registration-form input[type="password"],
#morley-registration-form select {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border: 2px solid #ddd;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
    line-height: 40px;
}

/* Focus state */
#morley-login-form input:focus,
#morley-registration-form input:focus,
#morley-registration-form select:focus {
    border-color: #a5133a; /* red highlight */
    outline: none;
}

/* Labels */
#morley-login-form label,
#morley-registration-form label {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: block;
    font-family: "Gotham", sans-serif;
    color: #111827;
}

/* Buttons */
#morley-login-form button,
#morley-registration-form button {
    width: 100%;
    padding: 1.5rem 0;
    border-radius: 0.75rem;
    background: #a5133a;
    color: #fff;
    border: none;
    font-weight: 700;
    text-align: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#morley-login-form button:hover,
#morley-registration-form button:hover {
    background: #870f2e;
    transform: translateY(-1px);
}

/* Error messages */
#morley-login-form .login-error,
#morley-registration-form .registration-error {
    color: #dc2626;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Toggle link */
#morley-login-toggle,
#morley-registration-toggle {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #a5133a;
    cursor: pointer;
    text-decoration: underline;
}

.auth-switch{
    font-size: 1.5rem !important;
    font-weight: 500 !important;
}

.show-password-input{
    display: none !important;
}

/* Gravity Form container styling */
#morley-registration-form .gform_wrapper {
    margin: 0;
    padding: 0;
}

#show-registration, #show-login {
    color: #a5133a; /* your red color */
    text-decoration: underline;
    cursor: pointer; /* so it looks clickable */
    font-weight: 500; /* optional, adjust weight if desired */
}

.register-toggle-link:hover {
    color: #d61f4d; /* slightly brighter red on hover, optional */
}

/* ---------------------------------- */
/* Return to cart button Styling  */
/* ---------------------------------- */
.return-to-cart-wrapper {
    display: flex;
    justify-content: flex-end; /* align button to the right */
    margin-bottom: 1.5rem;
    margin-top: -10rem; /* For hiding above p tag added in by brix */
}

.return-to-cart-btn {
    display: inline-flex;
    align-items: center;
    padding: 1.5rem 1.5rem;
    background-color: #a5133a; /* same as checkout button */
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.50rem;
    border-radius: 0.75rem;
    border: 2px solid #a5133a;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.return-to-cart-btn:hover {
    background-color: #fff;
    color: black;
    transform: translateY(-1px);
}

.checkout-donation{
    display: flex;
    justify-content: space-between;
}

.checkout-btn.force-disabled,
.checkout-btn.force-disabled:hover {
    background-color: #ccc !important;
    border-color: #ccc !important;
    color: #888 !important;
    cursor: not-allowed !important;
}

.auth-error{
    margin-bottom: 1rem;
}