.ci-payment-fields {
  direction: rtl;
  line-height: 1.9;
  text-align: right;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e4e7eb;
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  margin: 12px 0 18px;
  box-shadow: 0 10px 26px rgba(0,0,0,.04);
}
.ci-payment-fields * { box-sizing: border-box; }
.ci-payment-fields h4 {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: #1f2937;
}
.ci-payment-fields h4 + .ci-form-grid,
.ci-payment-fields h4 + .ci-doc-grid,
.ci-payment-fields h4 + .ci-tiny { margin-top: 8px; }
.ci-form-grid,
.ci-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  align-items: start;
}
.ci-field { min-width: 0; margin: 0 !important; }
.ci-full { grid-column: 1 / -1; }
.ci-field label,
.ci-doc label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  color: #253242;
}
.ci-field input,
.ci-field select,
.ci-field textarea {
  display: block;
  width: 100% !important;
  max-width: 100%;
  margin: 0 !important;
  min-height: 46px;
  border: 1px solid #cfd8df;
  background: #fff;
  color: #1f2937;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.ci-field input:focus,
.ci-field select:focus,
.ci-field textarea:focus {
  border-color: #6cc04a;
  box-shadow: 0 0 0 3px rgba(108,192,74,.14);
  outline: none;
}
.ci-field textarea {
  resize: vertical;
  min-height: 88px;
}
.ci-doc {
  padding: 14px;
  border: 1px solid #dfe5ea;
  border-radius: 12px;
  background: #fbfcfd;
  min-width: 0;
}
.ci-doc input[type=file],
.ci-file-input {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 12px;
  background: #fff;
  border: 1px dashed #c6d0d8;
  border-radius: 10px;
  padding: 10px;
}
.ci-doc input[type=file]::file-selector-button,
.ci-file-input::file-selector-button {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  margin-inline-end: 10px;
  background: #6cc04a;
  color: #fff;
  cursor: pointer;
}
.ci-upload-status {
  display: block;
  font-size: 12px;
  margin-top: 8px;
  color: #6e7580;
  font-weight: 600;
}
.ci-upload-status.ci-ok { color: #16804b; }
.ci-upload-status.ci-error { color: #bd2633; }
.ci-tiny {
  font-size: 12px;
  line-height: 1.9;
  color: #606b75;
  margin: 8px 0 14px;
}
.ci-alert {
  padding: 12px 14px;
  border: 1px solid #e6d18d;
  background: #fff9e8;
  border-radius: 10px;
}
.ci-profile-note {
  border-right: 4px solid #398368;
  padding: 10px 12px;
  background: #f3faf7;
  border-radius: 10px;
  margin-bottom: 14px;
}
.ci-installment-summary,
.ci-order-info {
  border: 1px solid #d9e6dd;
  border-radius: 14px;
  padding: 16px;
  margin: 18px 0;
  background: linear-gradient(180deg,#fcfefd 0%,#f7fbf8 100%);
}
.ci-installment-summary strong:first-child,
.ci-order-info h3 {
  display: block;
  margin-bottom: 10px;
  color: #1f2937;
}
.ci-installment-summary p,
.ci-order-info p { margin: 6px 0; }
.ci-installment-summary hr {
  height: 1px;
  border: none;
  background: #d9e6dd;
  margin: 10px 0;
}
.ci-installment-summary small,
.ci-product-check-note {
  display: block;
  font-size: 12px;
  color: #68736d;
  margin-top: 8px;
}
.ci-account-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e6eaee;
  border-radius: 14px;
  background: #fff;
}
.ci-account-wrap table {
  margin: 0 !important;
  border: 0 !important;
}
.ci-account-wrap th,
.ci-account-wrap td {
  text-align: right;
  vertical-align: middle;
  padding: 14px 12px !important;
}
.ci-account-wrap thead th {
  background: #f7f9fb;
  color: #334155;
  font-weight: 800;
}
.ci-account-wrap tbody tr:nth-child(even) td { background: #fcfcfd; }
.ci-pages { margin-top: 12px; }
.ci-pages .button,
.ci-account-wrap .button,
.ci-order-info .button {
  border-radius: 10px !important;
  min-height: 40px;
  line-height: 38px;
  padding: 0 14px !important;
}
.ci-product-price-info {
  border: 1px solid #d9e6dd;
  border-radius: 12px;
  background: #f9fcfa;
  padding: 12px 14px;
  margin: 12px 0 20px;
  line-height: 1.9;
}
.ci-product-price-info p { margin: 0 0 4px; }
.ci-product-price-info small { font-size: 12px; color: #67716c; }

/* Better spacing inside Flatsome / WooCommerce payment box */
.woocommerce-checkout .payment_box.payment_method_ci_checks {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.woocommerce-checkout .payment_box.payment_method_ci_checks::before { display: none !important; }
.woocommerce-checkout #payment .payment_methods .payment_box .ci-payment-fields {
  margin-top: 0;
}

/* Make general account/order forms look consistent when this endpoint is shown in My Account */
.woocommerce-account .woocommerce-MyAccount-content .ci-payment-fields,
.woocommerce-account .woocommerce-MyAccount-content .ci-order-info,
.woocommerce-account .woocommerce-MyAccount-content .ci-account-wrap,
.woocommerce-view-order .ci-order-info {
  max-width: 100%;
}

/* Improve any raw field table that may be printed by theme overrides */
.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table td,
.woocommerce-view-order table.shop_table th,
.woocommerce-view-order table.shop_table td {
  text-align: right;
}

@media (max-width: 680px) {
  .ci-payment-fields {
    padding: 14px;
    border-radius: 12px;
  }
  .ci-form-grid,
  .ci-doc-grid { grid-template-columns: minmax(0, 1fr); }
  .ci-full { grid-column: auto; }
  .ci-account-wrap th,
  .ci-account-wrap td { white-space: nowrap; }
}

/* Standalone flow links shown within the WooCommerce payment method. */
.ci-standalone-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.ci-standalone-steps>div{border:1px solid #dfece1;background:#fafffb;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:4px;min-width:0}
.ci-standalone-steps strong{color:#273b2b;font-size:13px}.ci-standalone-steps span{font-size:11px;color:#607460}.ci-standalone-steps a{color:#1d963c;font-size:12px;font-weight:800;text-decoration:underline}
@media(max-width:600px){.ci-standalone-steps{grid-template-columns:1fr}}

/* Mobile: keep unselected cheque details collapsed, even with theme display overrides. */
@media (max-width: 767px) {
  #payment .payment_methods li.payment_method_ci_checks > .payment_box,
  #payment .payment_methods li.payment_method_ci_checks .ci-payment-fields {
    display: none !important;
  }
  #payment .payment_methods li.payment_method_ci_checks.ci-checks-selected > .payment_box,
  #payment .payment_methods li.payment_method_ci_checks.ci-checks-selected .ci-payment-fields {
    display: block !important;
  }
  #payment .payment_methods li.payment_method_ci_checks:has(input[name="payment_method"][value="ci_checks"]:checked) > .payment_box,
  #payment .payment_methods li.payment_method_ci_checks:has(input[name="payment_method"][value="ci_checks"]:checked) .ci-payment-fields {
    display: block !important;
  }
}
