/* =========================================================
   AIM Checkout Forms
   Scope: only within wrapper element that has class .aim-checkout
   Layout (2 columns) is additionally scoped to row id:
   #checkout_singleProduct .aim-checkout
   ========================================================= */

/* -----------------------------
   1) Notices (keep visible)
------------------------------ */
.aim-checkout .woocommerce-NoticeGroup,
.aim-checkout .woocommerce-message,
.aim-checkout .woocommerce-info,
.aim-checkout .woocommerce-error {
  display: block !important;
}

/* -----------------------------
   2) Inline errors: hide text, keep field highlight
------------------------------ */
.aim-checkout p.checkout-inline-error-message,
.aim-checkout .form-row .checkout-inline-error-message,
.aim-checkout .woocommerce-input-wrapper > p[id$="_description"].checkout-inline-error-message,
.aim-checkout .form-row .woocommerce-input-wrapper .woocommerce-error,
.aim-checkout .woocommerce-input-wrapper .woocommerce-error,
.aim-checkout .woocommerce-input-wrapper .error {
  display: none !important;
}

/* Invalid fields highlight */
.aim-checkout .woocommerce-invalid input.input-text,
.aim-checkout .woocommerce-invalid select,
.aim-checkout .woocommerce-invalid textarea,
.aim-checkout .woocommerce-invalid .select2-selection,
.aim-checkout .opc-error {
  border: 2px solid #e74c3c !important;
  background: #ffeaea !important;
}

/* Select2 error state (country/state) */
.aim-checkout select.opc-error + .select2 .select2-selection {
  border: 2px solid #e74c3c !important;
  background: #ffeaea !important;
}

/* -----------------------------
   3) Inputs / Select2
------------------------------ */
.aim-checkout .td-woo-default .select2-selection {
  border: 1px solid #9d9d9d;
}
.aim-checkout .woocommerce form .form-row select {
  line-height: 25px;
}
.aim-checkout .woocommerce form .form-row .input-text,
.aim-checkout .woocommerce form .form-row select {
  border: 1px solid #b1b1b1;
}

/* Keep first/last at 50% */
.aim-checkout .woocommerce form .form-row-first,
.aim-checkout .woocommerce form .form-row-last,
.aim-checkout .woocommerce-page form .form-row-first,
.aim-checkout .woocommerce-page form .form-row-last {
  width: 50%;
  overflow: visible;
}

/* Hide order notes (keeps checkout clean on landing) */
.aim-checkout .woocommerce-additional-fields {
  display: none !important;
}

/* Table spacing */
.aim-checkout .woocommerce table.shop_table {
  margin: 0 !important;
}

/* -----------------------------
   4) Payment UI
------------------------------ */
.aim-checkout .td-woo-default .woocommerce-checkout #payment ul.payment_methods,
.aim-checkout .td-woo-default .woocommerce-checkout #payment div.form-row {
  padding: 0;
}

/* Payment methods list -> column */
.aim-checkout #payment .wc_payment_methods {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Each method as a box */
.aim-checkout #payment .wc_payment_methods li.wc_payment_method {
  border: 1px solid #eee;
  border-radius: 8px;
  background: transparent;
  padding: 3px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  margin: 0 0 10px 0 !important;
}

/* Selected method (works if JS toggles .is-selected) */
.aim-checkout #payment .wc_payment_methods li.wc_payment_method.is-selected {

}

/* Progressive enhancement (modern browsers): border on LI when radio checked */
.aim-checkout #payment .wc_payment_methods li.wc_payment_method:has(input[type="radio"]:checked) {
  border-color:none;
  box-shadow: none;
}

/* Radio visible */
.aim-checkout #payment .wc_payment_methods li.wc_payment_method input[type="radio"] {
  display: inline-block !important;
  margin-right: 10px;
  transform: translateY(1px);
}

/* Label row */
.aim-checkout #payment .wc_payment_methods li.wc_payment_method > label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
}

/* Icons */
.aim-checkout #payment .wc_payment_methods li.wc_payment_method img,
.aim-checkout li.wc_payment_method img {
  height: 20px;
  max-width: 100% !important;
  width: auto;
}

/* Place order button */
.aim-checkout .td-woo-default .woocommerce-checkout .woocommerce-checkout-payment button.button,
.aim-checkout #place_order.button {
  background-color: #d40000;
  width: 100%;
  opacity: 1;
  cursor: pointer;
}

/* Disabled place order */
.aim-checkout #place_order.button:disabled,
.aim-checkout #place_order.button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Payment description collapse */
.aim-checkout #payment .payment_box {
  display: none !important;
}
.aim-checkout #payment .wc_payment_method input[type="radio"]:checked ~ .payment_box {
  display: block !important;
}

/* -----------------------------
   5) Buyer type UI (if present)
------------------------------ */
.aim-checkout .opc-buyer-type {
  margin: 0 0 14px !important;
}
.aim-checkout .opc-buyer-type__opt.is-selected {
  border-color: #e9e9e9;
  background: #f1f1f1;
  font-weight: 600;
}
/* Progressive enhancement */
.aim-checkout .opc-buyer-type__opt:has(input:checked) {
  border-color: #e9e9e9;
  background: #f1f1f1;
  font-weight: 600;
}

/* =========================================================
   6) TagDiv layout override (scoped to row id)
   Row has id="checkout_singleProduct"
   This avoids affecting other checkouts/forms.
   ========================================================= */

/* Force two-column layout */
#checkout_singleProduct .aim-checkout .td-woo-default,
#checkout_singleProduct .aim-checkout form.checkout.woocommerce-checkout {
  display: flex !important;
  flex-direction: row !important;
  gap: 32px !important;
  align-items: flex-start !important;
}

/* Columns (inside form) */
#checkout_singleProduct .aim-checkout form.checkout.woocommerce-checkout .td-woo-billing {
  width: 50% !important;
  max-width: 50% !important;
  float: none !important;
  margin: 0 !important;
  background-color: #ffffff;
}

#checkout_singleProduct .aim-checkout form.checkout.woocommerce-checkout .td-woo-review {
  width: 50% !important;
  max-width: 50% !important;
  float: none !important;
  margin: 0 !important;
  display: block !important;
  background: #fbfbfb;
  padding: 7px 13px 2px 13px;
}

h3#ship-to-different-address {
    display: none;
}



.aim-checkout #payment .payment_box {
  display: none;
}

.aim-checkout #payment li.wc_payment_method.is-selected .payment_box {
  display: block !important;
}



#billing_company_field,
#billing_pib_field {
    display: none;
}

.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    width: 48%;
    float: left;
    margin-right: 4%;
}

.woocommerce-checkout .form-row-first {
    margin-right: 4%;
}
.companyChoice, .personalChoice {
    cursor: pointer;
}

/* Crveni border za aktivnu opciju */
.personalChoice.active, 
.companyChoice.active {
    border: 2px solid #cf0a2c !important; /* Crvena boja */
}

/* Default border za neaktivne opcije */
.personalChoice:not(.active), 
.companyChoice:not(.active) {
    border: 2px solid #ccc!important; /* Sivi border */
}


/* ——— SWITCHER (isključivo unutar #personalCompany) ———
#personalCompany .personalChoice,
#personalCompany .companyChoice {
  border: 2px solid #b7b7b7;
  border-radius: 0;
  text-align: center;
  color: #6b7280;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}
#personalCompany .personalChoice.plan-selected,
#personalCompany .companyChoice.plan-selected {
  border-color: #cf0a2c !important;
  box-shadow: inset 0 0 0 2px rgba(207, 10, 44, 0.08);
}
#personalCompany .personalChoice.plan-selected *,
#personalCompany .companyChoice.plan-selected * {
  color: #111;
}
#personalCompany .personalChoice.plan-unselected,
#personalCompany .companyChoice.plan-unselected {
  border-color: #d9d9d9;
  opacity: 0.75;
  filter: grayscale(100%);
}
#personalCompany .personalChoice.plan-unselected:hover,
#personalCompany .companyChoice.plan-unselected:hover {
  opacity: 0.9;
  filter: none;
}
#personalCompany .personalChoice:focus-visible,
#personalCompany .companyChoice:focus-visible {
  outline: 2px solid #cf0a2c;
  outline-offset: 3px;
}
 */




/* Promeni boju za boldovane "Billing" poruke */
.woocommerce-error strong {
    color: #000000; /* Crna boja za boldovane poruke */
}


























/* Mobile */
@media (max-width: 900px) {
  #checkout_singleProduct .aim-checkout .td-woo-default,
  #checkout_singleProduct .aim-checkout form.checkout.woocommerce-checkout {
    flex-direction: column !important;
  }

  #checkout_singleProduct .aim-checkout form.checkout.woocommerce-checkout .td-woo-billing,
  #checkout_singleProduct .aim-checkout form.checkout.woocommerce-checkout .td-woo-review {
    width: 100% !important;
    max-width: 100% !important;
  }
}