/* ==== FONT IMPORT ==== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Poppins:wght@400;500;600;700&display=swap');

/* ==== GLOBAL TYPE & COLOR RESET ==== */
body,
.psb-checkout-container,
.psb-checkout-form,
.c-checkout-summary {
    font-family: 'Poppins', 'Inter', Arial, sans-serif !important;
    background: #FFFFFF;
    color: #1C1C1C;
    letter-spacing: normal;
}

/* ==== HEADINGS & SUBHEADINGS ==== */
.o-page-head h1 {
    font-size: 36px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    color: #1C1C1C !important;
    margin-bottom: 0.2em;
    text-transform: capitalize;
    letter-spacing: normal;
}
.o-page-head p {
    font-size: 20px !important;
    font-family: 'Inter', sans-serif !important;
    color: #939393 !important;
    margin-top: 0;
    line-height: 32px;
}

/* ==== FORM CONTAINER ==== */
.checkout-form-container {
    background: #fff !important;
    border-radius: 16px !important;
    max-width: 600px;
    width: 100%;
    margin-bottom: 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==== FORM FIELDS ==== */
.psb-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 2.1rem;
}
.psb-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}
.psb-form-field label {
    font-size: 20px !important;
    font-family: 'Inter', sans-serif !important;
    color: #344054 !important;
    font-weight: 500 !important;
    margin-bottom: 0.25em;
    letter-spacing: normal;
}
.psb-input {
    width: 100%;
    height: 50px !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-family: 'Inter', 'Poppins', Arial, sans-serif !important;
    font-weight: 400;
    color: #1C1C1C !important;
    background: #fff !important;
    border: 1px solid #D0D5DD !important;
    padding: 0 1.2em !important;
    box-sizing: border-box;
    transition: border 0.2s;
    letter-spacing: 0.01em;
}
.psb-input:focus {
    outline: none !important;
    border-color: #2B3186 !important;
    box-shadow: 0 0 0 2px rgba(43,49,134,0.10) !important;
}
.psb-input::placeholder {
    color: #98a2b3 !important;
    font-family: 'Inter', sans-serif !important;
}
.psb-form-field.error .psb-input {
    border-color: #f97066 !important;
}
.psb-form-field.success .psb-input {
    border-color: #12b76a !important;
}

/* ==== HELP/ERROR ==== */
.psb-field-help {
    font-size: 13px !important;
    color: #667085 !important;
    margin-top: 0.13em;
}
.psb-field-error {
    font-size: 13px !important;
    color: #d92d20 !important;
    display: none;
    margin-top: 0.18em;
}
.psb-form-field.error .psb-field-error {
    display: block;
}

/* ==== GRID LAYOUT ==== */
.o-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 780px) 460px;
    gap: 3.2rem;
    max-width: 1200px;
    margin-inline: auto;
    padding-block: 2rem;
    align-items: flex-start;
}

/* ==== SUMMARY CARD ==== */
.c-checkout-summary {
    background: #fff !important;
    border: 0.6px solid #C5C5C5 !important;
    border-radius: 16px !important;
    padding: 2.1rem 2rem 2rem 2rem !important;
    box-shadow: 0 2px 8px rgba(20,20,50,0.04);
    min-width: 340px;
    max-width: 370px;
    width: 100%;
    position: relative;
}

.c-summary__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.6rem;
}
.c-summary__header h3 {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600;
    font-size: 22px !important;
    color: #000 !important;
    text-transform: capitalize;
    margin: 0;
    letter-spacing: normal;
}
.c-summary__header .icon {
    width: 28px;
    height: 28px;
}
.c-summary__items,
.c-summary__totals {
    margin-bottom: 1.3rem;
}
.c-summary__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}
.c-summary__item-label {
    font-family: 'Poppins', sans-serif !important;
    font-size: 17px !important;
    color: #939393 !important;
    font-weight: 500 !important;
    text-transform: capitalize;
    letter-spacing: normal;
}
.c-summary__item-value {
    font-family: 'Inter', sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: rgba(4,5,5,0.8) !important;
    text-align: right !important;
}

.c-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 0.6px solid #C5C5C5;
}
.c-summary__total span {
    font-size: 24px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: rgba(4,5,5,0.8) !important;
    letter-spacing: normal;
}

.c-summary__final {
    margin-top: 2.2rem;
}

/* ==== SUCCESS CARDS — CLEAN, BRAND-ALIGNED ==== */
.c-banner--success {
  --brand: #2B3186;
  --ink: #0F172A;
  --muted: #667085;
  --line: #E6E9F5;
  --surface: #FFFFFF;
  --hint: #F6F7FF;
  --success: #16A34A;

  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  margin: 14px 0 !important;
  background: var(--surface) !important;
  display: flex !important;
  align-items: stretch !important;
  gap: 12px !important;
  box-shadow: 0 6px 18px rgba(23, 23, 55, .05) !important;
  font-family: 'Poppins', 'Inter', Arial, sans-serif !important;
}

/* compact success banner text */
.c-banner--success span {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
}



/* ==== PAY BUTTON ==== */
.psb-pay-button,
.c-btn--cta.psb-pay-button {
    background: #2B3186 !important;
    color: #fff !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    padding: 18px 0 !important;
    width: 100% !important;
    margin-top: 1.2em !important;
    border: none !important;
    box-shadow: none !important;
    transition: background 0.2s;
    text-align: center !important;
    display: block !important;
    letter-spacing: normal;
    cursor: pointer;
}
.psb-pay-button:hover,
.c-btn--cta.psb-pay-button:hover {
    background: #21256a !important;
}
.psb-pay-button:disabled,
.c-btn--cta.psb-pay-button:disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* ==== SPECIAL FIELD FORMATS ==== */
#psb-gstin,
#psb-msme-number {
    text-transform: uppercase;
    font-family: 'Courier New', Courier, monospace !important;
    letter-spacing: 0.06em;
}

/* GSTIN Verification States */
#psb-gstin.psb-verifying {
    border-color: #2B3186 !important;
    box-shadow: 0 0 0 2px rgba(43, 49, 134, 0.1) !important;
}

#psb-gstin.psb-verified {
    border-color: #12b76a !important;
    box-shadow: 0 0 0 2px rgba(18, 183, 106, 0.1) !important;
}

#psb-gstin.psb-format-valid {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.1) !important;
}

/* Auto-filled company name styling */
#psb-company-name.psb-auto-filled {
    background: rgba(18, 183, 106, 0.02) !important;
    border-color: #12b76a !important;
}

.psb-form-field.psb-auto-filled-animation {
    animation: psb-glow 1s ease;
}

@keyframes psb-glow {
    0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0); }
    50% { box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.2); }
    100% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0); }
}

/* ==== ERROR/LOADING ==== */
.psb-checkout-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #dc2626;
    font-size: 15px;
}
.psb-checkout-loading {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 999999;
}
.psb-loading-content {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
}
.psb-loading-content .psb-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(43, 49, 134, 0.1);
    border-top: 4px solid #2B3186;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.psb-loading-content p {
    font-size: 1rem;
    color: #667085;
    margin: 0;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1200px) {
    .o-checkout-grid { grid-template-columns: 1fr 340px; }
    .checkout-form-container { max-width: 100%; }
}
@media (max-width: 1024px) {
    .o-checkout-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .c-checkout-summary {
        min-width: unset; width: 100%;
        order: -1;
    }
    .checkout-form-container { padding: 2rem 1rem !important; }
}
@media (max-width: 768px) {
    .psb-checkout-container { padding: 1rem 0.75rem; }
    .o-page-head h1 { font-size: 28px !important; }
    .checkout-form-container { padding: 1.2rem !important; }
    .c-checkout-summary { padding: 1.2rem !important; }
    .psb-checkout-form { gap: 1.1rem; }
}
@media (max-width: 600px) {
    .psb-input { height: 44px !important; font-size: 16px !important; }
    .c-checkout-summary, .checkout-form-container { padding: 0.9rem !important; }
    .psb-pay-button, .c-btn--cta.psb-pay-button { padding: 14px 0 !important; font-size: 15px !important; }
}
@media (max-width: 480px) {
    .checkout-form-container, .c-checkout-summary { border-radius: 8px !important; }
    .o-checkout-grid { gap: 1rem; }
}

/* ==== PRINT ==== */
@media print {
    .psb-checkout-container { background: white; }
    .psb-pay-button { display: none !important; }
}

/* ===== GRID LAYOUT (desktop first) ===== */
.o-checkout-grid{
  display: grid;
  grid-template-columns: minmax(0,780px) 460px;
  grid-template-areas:
    "head head"
    "form summary";
  gap: 3.2rem;
  max-width: 1200px;
  margin-inline: auto;
  padding-block: 2rem;
  align-items: flex-start;
}

.o-page-head{            grid-area: head; }
.checkout-form-container{grid-area: form; }
.c-checkout-summary{     grid-area: summary; }

/* ===== Tablet & down: stack in correct order ===== */
@media (max-width: 1024px){
  .o-checkout-grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "form"
      "summary";
    gap: 2rem;
  }

  /* kill any accidental reordering from older rules */
  .c-checkout-summary{ order: initial !important; }
}

/* Keep your smaller breakpoints as-is (padding, sizes, etc.) */
