
.payment-history-panel{display:none}
.payment-history-panel.show{display:block}
.payment-history-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin:18px 0 14px}
.payment-history-head h3{margin:0 0 5px;color:#17314b;font-size:27px}
.payment-history-head p{margin:0;color:#718090}
.payment-history-refresh{border:1px solid #d5dee7;background:#eef3f7;color:#17314b;border-radius:10px;padding:10px 14px;font-weight:800}
.payment-history-tools{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:12px;margin-bottom:10px}
.payment-history-tools input,.payment-history-tools select{width:100%;height:45px;border:1px solid #d4dee7;border-radius:11px;background:#fff;padding:0 13px;font:inherit;color:#20364b;box-sizing:border-box}
.payment-history-results-meta{min-height:20px;color:#718090;font-size:13px;font-weight:700;margin:4px 0 9px}
.payment-history-status{display:none;padding:12px 14px;border-radius:10px;margin-bottom:10px;background:#f1f5f8;color:#536575}
.payment-history-status.show{display:block}.payment-history-status.error{background:#fff0f0;color:#9b2525}
.payment-history-list{display:grid;gap:10px;max-height:440px;overflow:auto;padding-right:4px}
.payment-history-card{border:1px solid #dce4ea;border-radius:14px;background:#fff;padding:15px 16px}
.payment-history-card-top{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:12px}
.payment-history-card-top strong{font-size:18px;color:#14304b}.payment-history-card-top time{font-size:13px;color:#718090;font-weight:700}
.payment-history-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.payment-history-item small{display:block;color:#7a8997;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}.payment-history-item strong{color:#253b50;font-size:14px;overflow-wrap:anywhere}.payment-history-item.full{grid-column:1/-1}
.payment-history-empty{padding:24px;text-align:center;border:1px dashed #ccd7df;border-radius:14px;color:#718090;background:#f8fafb}
.payment-history-total{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:14px;padding:15px 17px;border-top:2px solid #163653;background:#f3f7fa;border-radius:10px;color:#17314b}.payment-history-total span{font-weight:900}.payment-history-total strong{font-size:22px}
.payment-history-footer{text-align:center;color:#8795a2;font-size:12px;border-top:1px solid #e1e7ec;margin-top:12px;padding-top:11px}
@media(max-width:700px){.payment-history-head{margin-top:12px}.payment-history-head h3{font-size:24px}.payment-history-tools{grid-template-columns:1fr}.payment-history-list{max-height:none}.payment-history-grid{grid-template-columns:1fr 1fr}.payment-history-card-top{display:block}.payment-history-card-top time{display:block;margin-top:4px}.payment-history-item.full{grid-column:1/-1}}


/* Payment History compact vertical spacing */
#paymentHistoryPanel{
  min-height:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
}

/* Embedded Global Payments checkout */
#portalPaymentPanel .payment-continue:disabled{
  cursor:wait;
  opacity:.72;
}

#portalPaymentPanel .payment-coming-soon.error,
#portalPaymentPanel .portal-payment-result.error{
  color:#9f1d20;
  background:#fff0f0;
  border-color:#efb7b8;
}

#portalPaymentPanel .payment-coming-soon.success,
#portalPaymentPanel .portal-payment-result.success{
  color:#17643a;
  background:#effaf3;
  border-color:#abd6bb;
}

#portalPaymentPanel .payment-coming-soon.processing,
#portalPaymentPanel .portal-payment-result.processing{
  color:#244f79;
  background:#eef6ff;
  border-color:#b7d2eb;
}

.portal-secure-payment{
  margin-top:18px;
  padding:20px;
  border:1px solid #cbd7e3;
  border-radius:14px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,39,66,.1);
}

.portal-secure-payment[hidden]{display:none!important}

.portal-secure-payment-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
  color:#0f2742;
  font-size:1rem;
}

.portal-secure-payment-head span{font-weight:800}
.portal-secure-payment-head strong{font-size:1.25rem;color:#17643a}

#globalPaymentsCardForm{
  min-height:260px;
  width:100%;
}

.portal-secure-payment-note{
  margin:10px 0 0;
  color:#5d6875;
  font-size:.9rem;
  line-height:1.5;
}

.portal-payment-result{
  display:none;
  margin-top:12px;
  padding:12px 14px;
  border:1px solid transparent;
  border-radius:10px;
  font-size:.95rem;
  font-weight:650;
  line-height:1.5;
}

.portal-payment-result.show{display:block}
#portalPaymentPanel .portal-payment-result.review{
  background:#fff8e7;
  border-color:#f3d278;
  color:#73521b;
  white-space:pre-line;
  overflow-wrap:anywhere;
}

.portal-payment-cancel{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:14px;
  padding:10px 14px;
  border:1px solid #aeb9c5;
  border-radius:9px;
  background:#fff;
  color:#344353;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.portal-payment-cancel:hover{background:#f4f7fa}
.portal-payment-cancel:disabled{cursor:wait;opacity:.6}
.portal-payment-cancel[hidden]{display:none!important}
#portalPaymentResume{background:#bd1e2d;border-color:#bd1e2d;color:#fff;margin-right:8px;text-decoration:none}
#portalPaymentResume:hover{background:#a91926}
#portalPaymentCheck:focus-visible,#portalPaymentResume:focus-visible{outline:3px solid #7eaee7;outline-offset:2px}
@media(max-width:600px){#portalPaymentResume,#portalPaymentCheck{width:100%;margin-right:0}}

.payment-history-status-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:3px 8px;
  border-radius:999px;
  background:#eef3f8;
  color:#41556a;
  font-size:.75rem;
  font-weight:800;
  text-transform:capitalize;
}

.payment-history-status-badge.captured{background:#e5f6eb;color:#17643a}
.payment-history-status-badge.declined{background:#fde9e9;color:#9f1d20}
.payment-history-status-badge.processing{background:#e8f1fb;color:#244f79}

@media(max-width:620px){
  .portal-secure-payment{padding:14px;margin-left:-4px;margin-right:-4px}
  .portal-secure-payment-head{align-items:flex-start;flex-direction:column;gap:2px}
  #globalPaymentsCardForm{min-height:285px}
}

#paymentHistoryPanel .portal-panel-head,
#paymentHistoryPanel .account-panel-head,
#paymentHistoryPanel .payment-history-head{
  margin-top:0 !important;
  padding-top:0 !important;
}

#paymentHistoryPanel .payment-history-shell,
#paymentHistoryPanel .customer-payment-history,
#paymentHistoryPanel .portal-subpanel{
  min-height:0 !important;
  padding-top:18px !important;
  padding-bottom:16px !important;
}

#paymentHistoryPanel .portal-panel-footer,
#paymentHistoryPanel .payment-history-footer{
  margin-top:14px !important;
  padding-top:12px !important;
  padding-bottom:0 !important;
}

#paymentHistoryPanel .payment-history-total{
  margin-bottom:14px !important;
}

/* The main customer portal modal/card was reserving excessive vertical space.
   Let Payment History size naturally to its content. */
.customer-portal-modal:has(#paymentHistoryPanel:not([hidden])),
.customer-portal-card:has(#paymentHistoryPanel:not([hidden])),
.customer-account-modal:has(#paymentHistoryPanel:not([hidden])),
.customer-account-card:has(#paymentHistoryPanel:not([hidden])){
  min-height:0 !important;
  height:auto !important;
}

@media(max-width:720px){
  #paymentHistoryPanel .payment-history-shell,
  #paymentHistoryPanel .customer-payment-history,
  #paymentHistoryPanel .portal-subpanel{
    padding-top:14px !important;
    padding-bottom:12px !important;
  }

  #paymentHistoryPanel .portal-panel-footer,
  #paymentHistoryPanel .payment-history-footer{
    margin-top:10px !important;
    padding-top:10px !important;
  }
}


/* Payment History MAS 90 detail fields */
#customerPaymentHistory .payment-history-grid{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:18px 16px !important;
}

#customerPaymentHistory .payment-history-item{
  min-width:0;
}

#customerPaymentHistory .payment-history-item strong{
  overflow-wrap:anywhere;
}

@media(max-width:900px){
  #customerPaymentHistory .payment-history-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

@media(max-width:620px){
  #customerPaymentHistory .payment-history-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}


/* Payment History: remove wasted space above the toolbar/title.
   The actual panel id is #customerPaymentHistory. */
#customerPaymentHistory{
  padding-top:0 !important;
  padding-bottom:0 !important;
  margin-top:0 !important;
  min-height:0 !important;
}

#customerPaymentHistory.show{
  display:block !important;
  min-height:0 !important;
  height:auto !important;
}

#customerPaymentHistory .details-toolbar{
  margin-top:0 !important;
  padding-top:0 !important;
  margin-bottom:14px !important;
}

#customerPaymentHistory .payment-history-head{
  margin-top:0 !important;
}

/* Compact the outer customer portal card only while Payment History is open. */
#portalAccountCard:has(#customerPaymentHistory.show){
  padding-top:24px !important;
  padding-bottom:18px !important;
  min-height:0 !important;
  height:auto !important;
}

#portalAccountCard:has(#customerPaymentHistory.show) > .portal-eyebrow{
  margin-bottom:16px !important;
}

/* Keep the overlay close to the top instead of vertically reserving space. */
.portal-overlay:has(#customerPaymentHistory.show){
  align-items:flex-start !important;
  padding-top:12px !important;
  padding-bottom:12px !important;
}

@media(max-width:700px){
  #portalAccountCard:has(#customerPaymentHistory.show){
    padding-top:18px !important;
    padding-bottom:12px !important;
  }

  #portalAccountCard:has(#customerPaymentHistory.show) > .portal-eyebrow{
    margin-bottom:12px !important;
  }

  #customerPaymentHistory .details-toolbar{
    margin-bottom:10px !important;
  }

  #customerPaymentHistory .payment-history-head{
    margin-top:0 !important;
  }

  .portal-overlay:has(#customerPaymentHistory.show){
    padding-top:8px !important;
  }
}

/* Heartland hosted fields remain in processor-owned iframes. */
.heartland-card-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0 12px}
.heartland-card-form[hidden],#heartlandCancel[hidden]{display:none!important}
.heartland-wide{grid-column:1/-1}.heartland-field{min-width:0}
.heartland-field>span{display:block;margin-bottom:7px;color:#18344e;font-size:14px;font-weight:700}
.heartland-field>div{height:48px;border:1px solid #cbd7e3;border-radius:8px;background:#fff;overflow:hidden}
.heartland-field:focus-within{border-radius:8px;outline:2px solid #527ea8;outline-offset:2px}
.heartland-card-form iframe{display:block;width:100%!important;border:0!important}
.heartland-field iframe{height:48px!important}.heartland-pay,.heartland-pay iframe{height:48px!important}
.heartland-security{margin:0;color:#617186;font-size:12px;line-height:1.6}
#heartlandCancel{margin:8px 8px 0 0}
@media(max-width:380px){.heartland-card-form{grid-template-columns:1fr}.heartland-wide{grid-column:auto}}
