/* ============================================
   SHM PAYMENT MODULES CSS
   Shared styles for Invoice Payment & Payment Methods Manager
   ============================================
   TABLE OF CONTENTS
   ============================================
   1. SHARED BASE STYLES
   2. INVOICE PAYMENT MODULE
   3. PAYMENT METHODS MANAGER MODULE  
   4. LOADING COMPONENT
   5. ANIMATIONS
   6. MOBILE RESPONSIVE
   ============================================ */

/* ============================================
   1. SHARED BASE STYLES
   ============================================ */

/* === Base Button Text Styles === */
button,
input[type="button"],
input[type="submit"],
.btn,
.button {
  text-align: center;
  font-family: Gotham;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 24px; /* 218.182% */
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* === Form Container Base === */
.cc-form-container {
  font-family: "Gotham", sans-serif;
  color: #ffffff;
}

/* === Hidden Checkboxes (for custom styling) === */
.shm-payment-form input[type="checkbox"],
.cc-form-container input[type="checkbox"],
#enable_autopay_ach,
#enable_autopay_card {
  display: none;
}

/* === Form Input Styles === */
.cc-form-container input[type="password"],
.cc-form-container input[type="text"]:not(.otherAmountInput) {
  border-radius: 8px;
  background-color: transparent !important;
  font-family: "Gotham";
  font-style: normal;
  font-weight: 400 !important;
  font-size: 16px;
  line-height: 26px;
  color: #ffffff !important;
  margin-bottom: 15px;
  width: 100%;
  padding: 17px 24px;
}

/* === Toggle Switch Component === */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

#puser-invoice-frm .toggle-switch {
  display: inline-block !important;
  width: 48px !important;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: 0.4s;
  border-radius: 24px;
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  background-color: #4caf50;
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(24px);
}

.toggle-switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Global Messages === */
.global-message-container {
  margin: 0 auto;
}
.shm-payment-form .new-card-wrapper .save-method-option {
  border-bottom: 1px solid #2d3136;
  padding-bottom: 15px;
  margin-bottom: 0px !important;
  margin-top: 10px;
}

.global-message-container .message {
  font-family: "Gotham";
  font-size: 14px;
  line-height: 18px;
  border-radius: 10px;
  padding: 15px 45px;
  margin: 15px 0px;
  position: relative;
}

.global-message-container .message.success {
  background: #0d230f;
  color: #b0f3bf;
}

.global-message-container .message.success:before {
  content: "";
  display: block;
  width: 20px;
  height: 23px;
  background: url(../images/login-success-icon.svg) no-repeat 0 0;
  position: absolute;
  left: 14px;
  top: 14px;
}

.global-message-container .message.error {
  background: #280d0e;
  color: #fe8080;
}

.global-message-container .message.error:before {
  content: "";
  width: 22px;
  height: 25px;
  background: url(../images/form-error-icon.png) no-repeat 0 0;
  background-size: 100%;
  display: inline-block;
  position: absolute;
  top: 12px;
  left: 12px;
}

/* === Validation Errors === */
.shm-payment-form label.error,
#puser-invoice-frm label.error,
.payment-methods-wrapper label.error {
  background: url(../images/icon-info3.svg) no-repeat 0 0;
  color: #ff8181 !important;
  display: block;
  font-size: 12px !important;
  line-height: 1;
  text-transform: none;
  font-weight: normal;
  padding: 5px 0 5px 28px;
  margin-top: 5px;
  animation: fadeIn 0.2s ease-in;
}

.shm-payment-form input.error,
.shm-payment-form select.error,
#puser-invoice-frm input.error,
#puser-invoice-frm select.error,
.payment-methods-wrapper input.error {
  border-color: #ff8181 !important;
  margin-bottom: 5px !important;
}

/* === Autopay Components === */
.shm-payment-form .auto-pay-container {
  margin-bottom: 0px;
}

#add-payment-form .autopay-toggle-section {
  margin-top: 20px;
}

/* #puser-invoice-frm .autopay-toggle-section span {
  width: 100%;
} */

.payment-method-container .auto-pay-container .autopay-description {
  font-family: "Gotham";
  font-weight: 400;
  font-size: 12px;
  margin-top: 25px;
  letter-spacing: 0.5px;
  line-height: 18px;
  color: #5ea9ff;
}

.payment-method-container .auto-pay-container .autopay-description p {
  margin-bottom: 8px;
}

.payment-method-container
  .auto-pay-container
  .autopay-description
  p:last-child {
  margin-bottom: 0px;
  margin-top: 20px;
}

.payment-method-container .auto-pay-container .autopay-description a {
  text-decoration: underline;
}

.auto-pay-container .short-description {
  margin-top: 15px;
  font-family: "Gotham";
  font-size: 12px;
  line-height: 1.5;
  color: #ffffff;
}

.autopay-toggle-section .toggle-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.autopay-toggle-section .toggle-label {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.autopay-toggle-section .toggle-title {
  font-family: "Gotham";
  font-weight: 500;
  font-size: 16px;
  color: #fff;
  margin-bottom: 4px;
}

.autopay-toggle-section .toggle-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  transition: opacity 0.15s ease;
}

.toggle-description-disabled,
.toggle-description-enabled {
  display: block;
}

/* #puser-invoice-frm .saved-card-wrapper .toggle-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
} */

/* #puser-invoice-frm .saved-card-wrapper .toggle-label {
  flex: 1;
} */

/* === Delete Confirmation Component === */
.delete-confirmation,
.autopay-disable-confirmation {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.delete-confirmation-message,
.autopay-disable-confirmation .confirmation-message {
  color: #fff;
  font-family: "Gotham";
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.delete-confirmation-message strong,
.autopay-disable-confirmation .confirmation-message strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.delete-confirmation-buttons,
.autopay-disable-confirmation .confirmation-buttons {
  display: flex;
  gap: 12px;
}

.payment-methods-wrapper .payment-method-item .confirm-delete-btn,
.payment-methods-wrapper .payment-method-item .cancel-delete-btn,
.invoice-page-wrapper .shm-payment-form .confirm-delete-btn,
.invoice-page-wrapper .shm-payment-form .cancel-delete-btn,
.autopay-disable-confirmation .confirmation-buttons .confirm-btn,
.autopay-disable-confirmation .confirmation-buttons .cancel-btn {
  padding: 5px 15px !important;
  border-radius: 6px;
  height: auto !important;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  /* Base button text styles applied above */
}

.autopay-disable-confirmation .confirmation-buttons .cancel-btn,
.payment-methods-wrapper .payment-method-item .cancel-delete-btn,
.invoice-page-wrapper .shm-payment-form .cancel-delete-btn {
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.3);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.payment-methods-wrapper button:focus,
.invoice-page-wrapper button:focus {
  outline: none;
}

.confirm-delete-btn {
  background: #f44336;
  color: #fff;
}

.confirm-delete-btn:hover {
  background: #d32f2f;
}

.confirm-delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cancel-delete-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cancel-delete-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   2. INVOICE PAYMENT MODULE
   ============================================ */

/* === Page Layout === */
.invoice-page-wrapper {
  min-height: calc(100vh - 150px - 100px);
}

.invoice-payment-form-container {
  min-height: 500px;
  position: relative;
}

/* === Invoice Form Specific === */
#puser-invoice-frm .saved-card-wrapper label.saved-method-label,
#puser-invoice-frm .cc-form-container .auto-pay-container label.switch {
  padding: 0;
}

#puser-invoice-frm input[name="other_amount_input"] {
  width: 160px !important;
}

/* === Save Method Toggle === */
/* #puser-invoice-frm .save-method-toggle {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
} */

/* #puser-invoice-frm .save-method-toggle .toggle-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
} */

/* #puser-invoice-frm .save-method-toggle .toggle-label {
  flex: 1;
}

#puser-invoice-frm .save-method-toggle .toggle-title {
  font-family: "Gotham";
  font-size: 14px;
  color: #fff;
} */

/* === Payment Info Display === */
#puser-invoice-frm .message.payment-info {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 15px 20px;
  font-family: "Gotham";
  font-style: normal;
  font-weight: 300;
  font-size: 14px;
  line-height: 18px;
  color: #ffffff;
  margin: 15px 0;
  position: relative;
}

.autopay-info-container {
  padding: 22px 0;
  padding-top: 0px;
  color: #00aaff;
  font-family: "Gotham";
  border-bottom: 1px solid #2d3136;
  font-weight: 300;
  font-size: 14px;
  margin-bottom: 2rem;
}

.autopay-info-container .manage-autopay-link {
  color: #00aaff;
  text-decoration: underline;
}

.autopay-info-container .manage-autopay-link:hover {
  text-decoration: none;
}

#puser-invoice-frm .message .payment-breakdown {
  display: block;
}

#puser-invoice-frm .message .convenience-fee-msg {
  display: block;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  opacity: 0.9;
}

#puser-invoice-frm .message .paying-amount-msg,
#puser-invoice-frm .message .convenience-fee-amount-msg,
#puser-invoice-frm .message .total-amount-msg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

#puser-invoice-frm .message .total-amount-msg {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 500;
  font-size: 18px;
}

/* === Invoice Delete Confirmation === */
#puser-invoice-frm .invoice-delete-confirmation {
  width: 100%;
  flex-basis: 100%;
}

/* === Required for Autopay === */
/* .shm-payment-form .required-for-autopay {
  position: relative;
}

.shm-payment-form .autopay-notice {
  font-size: 0.85em;
  color: #fff;
  display: block;
  margin-top: 5px;
} */

/* ============================================
   3. PAYMENT METHODS MANAGER MODULE
   ============================================ */

/* === Page Layout === */
.payment-methods-wrapper {
  min-height: auto;
  background: inherit;
}

.payment-methods-wrapper .payment-methods-form-container {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  font-family: "Gotham";
  color: #ffffff;
  padding: 32px;
  padding-top: 0px;
  padding-bottom: 0px;
  width: 60%;
  margin: 0 auto;
  display: block;
  min-height: 200px;
  position: relative;
}

.payment-methods-wrapper .payment-methods-form-container header {
  padding-top: 24px;
  padding-bottom: 22px;
}

.payment-methods-wrapper .payment-method-div {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* === Hide save method option in payment methods manager === */
.payment-methods-wrapper .save-method-option,
.payment-methods-wrapper .save-method-toggle {
  display: none !important;
}

/* === Section Headers === */

.payment-method-section-wrapper {
  margin-top: 32px;
}

.add-method-section-wrapper {
  text-align: center;
  margin-top: 32px;
}

.payment-methods-wrapper .section-title {
  font-family: "Gotham";
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  line-height: 24px;
  margin-bottom: 16px;
}

/* === Payment Method Items === */
.payment-methods-wrapper .payment-method-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 12px;
  position: relative;
  transition: all 0.2s ease;
  flex-wrap: wrap; /* Keep this */
}

.payment-methods-wrapper .payment-method-item:focus,
.payment-methods-wrapper .payment-method-item:focus-visible {
  outline: none;
}

/* .payment-methods-wrapper .delete-confirmation {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  width: 100%;
  animation: slideDown 0.2s ease-out;
  flex-basis: 100%; 
  order: 10; 
} */

.payment-methods-wrapper .delete-confirmation {
  margin-top: 16px;
  width: 100%;
}

.payment-methods-wrapper .payment-method-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.payment-methods-wrapper .payment-method-item.expanded {
  background: rgba(255, 255, 255, 0.08);
}

.payment-methods-wrapper .payment-method-item {
  border: 1px solid transparent;
}

/* === Selected & Active States === */
.payment-methods-wrapper .payment-method-item.selected-method {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.payment-methods-wrapper .payment-method-item.autopay-active {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
}

/* === Method Icons === */
.payment-methods-wrapper .method-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.payment-methods-wrapper .method-icon i {
  width: 24px;
  height: 24px;
  display: block;
}

.payment-methods-wrapper .method-icon i.icon-credit-card {
  background: url(../images/icons/new-card.svg) no-repeat center center;
  /* background-size: 24px 24px; */
}

.payment-methods-wrapper .method-icon i.icon-bank {
  background: url(../images/icons/ach-card.svg) no-repeat center center;
  /* background-size: 24px 24px; */
}

.payment-methods-wrapper .method-icon i.icon-card-enabled {
  background: url(../images/icons/enabled-card.svg) no-repeat center center;
}

/* === Method Details === */
.payment-methods-wrapper .method-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.payment-methods-wrapper .method-number {
  font-family: "Gotham";
  font-weight: 400;
  font-size: 14px;
  color: #fff;
  line-height: 24px;
  letter-spacing: -0.1px;
  margin-bottom: 4px;
}

.payment-methods-wrapper .method-type {
  font-family: "Gotham";
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.2;
}

/* === Method Actions === */
.payment-methods-wrapper .method-delete-btn {
  background: transparent;
  border: 1px solid #ff6984;
  color: #ff6984;
  cursor: pointer;
  padding: 5px 10px;
  transition: all 0.2s;
  margin-left: auto;
  border-radius: 4px;
  white-space: nowrap;
  /* Base button text styles applied above */
}

.payment-methods-wrapper .method-delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Autopay Section === */

.payment-methods-wrapper .autopay-status-box {
  padding: 0;
  background: transparent;
}

.payment-methods-wrapper .autopay-enabled-display,
.payment-methods-wrapper .autopay-disabled-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.payment-methods-wrapper .autopay-enabled-display .autopay-method-display {
  display: flex;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  flex: 1;
}

.payment-methods-wrapper .autopay-label {
  font-family: "Gotham";
  font-weight: 500;
  font-size: 14px;
  color: #fff;
}

.payment-methods-wrapper .autopay-disabled-display .autopay-label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1;
}

.payment-methods-wrapper .autopay-manage-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.payment-methods-wrapper .autopay-manage-link:hover {
  color: #fff;
}

/* === Back Button === */
.payment-methods-wrapper .back-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  position: absolute;
  left: -20%;
  line-height: 24px;
  /* Base button text styles applied above */
}

.payment-methods-wrapper .back-btn:hover {
  color: #fff;
}

.payment-methods-wrapper .back-btn span::before {
  content: "";
  display: inline-block;
  width: 6.5px;
  height: 12px;
  background: url(../images/icons/back-arrow-icon.svg) no-repeat center center;
  background-size: contain;
  margin-right: 8px;
  vertical-align: middle;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: all 0.3s ease;
}

/* Hover state */
.payment-methods-wrapper .back-btn:hover span::before {
  opacity: 1;
  transform: translateX(-2px);
}

/* === Add Payment Button === */
.payment-methods-wrapper .add-payment-btn {
  align-items: center;
  color: #5ea9ff;
  display: flex;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  margin: 0 auto;
  padding: 0;
  /* Base button text styles applied above */
}

.payment-methods-wrapper .add-payment-btn i {
  content: "";
  display: inline-block;
  background: url(../images/profile-add-policy.svg) no-repeat 0px 0px;
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.payment-methods-wrapper .add-payment-btn:hover {
  color: #7fbdff;
}

.payment-methods-wrapper .add-payment-btn:focus {
  outline: none;
}

/* === Radio Selection === */
.autopay-selection-wrapper .method-radio {
  margin-right: 12px;
}

.autopay-selection-wrapper .method-radio input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: block !important;
}

.autopay-selection-wrapper .method-radio input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.autopay-selection-wrapper
  .method-radio
  input[type="radio"]:not(:disabled):hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.autopay-selection-wrapper .method-label {
  flex: 1;
  display: flex;
  align-items: center;
  cursor: default;
  margin: 0;
}

/* === Save Autopay Button === */
.autopay-selection-wrapper .save-autopay-btn {
  padding: 8px 20px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: none;
  /* Base button text styles applied above */
}

.autopay-selection-wrapper
  .payment-method-item.selected-method
  .save-autopay-btn {
  display: block;
}

.autopay-selection-wrapper
  .payment-method-item.autopay-active
  .save-autopay-btn {
  display: none !important;
}

.autopay-selection-wrapper .save-autopay-btn:hover {
  background: #45a049;
}

.autopay-selection-wrapper .save-autopay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === Autopay Disable Confirmation === */
.autopay-selection-wrapper .autopay-disable-confirmation {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.autopay-selection-wrapper .confirm-btn,
.autopay-selection-wrapper .cancel-btn {
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  /* Base button text styles applied above */
}

.autopay-selection-wrapper .confirm-btn {
  background: #f44336;
  color: #fff;
}

.autopay-selection-wrapper .confirm-btn:hover {
  background: #d32f2f;
}

.autopay-selection-wrapper .cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.autopay-selection-wrapper .cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* === Add Payment Form === */
.payment-methods-wrapper .payment-type-selector {
  margin-bottom: 24px;
}

.payment-methods-custom-select select {
  background-color: #222222 !important;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: "Gotham";
}

.payment-methods-custom-select .SumoSelect .CaptionCont {
  background-color: #222222;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px 24px;
  font-weight: 400;
  font-family: "Gotham";
  font-size: 15px;
  color: #fff;
  /* height: 55px; */
  height: 50px;
  line-height: 1.25;
}

.payment-methods-custom-select .SumoSelect.open > .CaptionCont {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.payment-methods-custom-select .SumoSelect.open > .optWrapper {
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 0 8px 8px;
  border-top: none;
  box-shadow: none;
  padding: 0px 0;
  top: 100%;
  margin-top: -1px;
}

.payment-methods-custom-select .SumoSelect > .optWrapper .options .opt {
  border: none;
  border-radius: 0;
  display: flex;
  padding: 14px 14px 14px 45px !important;
  position: relative;
  transition: background 0.2s ease;
}

.payment-methods-custom-select .SumoSelect > .optWrapper .options .opt:hover {
  background: rgba(255, 255, 255, 0.1);
}

.payment-methods-custom-select .SumoSelect > .optWrapper .options .opt span {
  border-radius: 50%;
  bottom: inherit;
  flex: 0 0 16px;
  height: 15px;
  left: 16px;
  margin: 0;
  position: absolute;
  top: 12px;
  width: 15px;
}

.payment-methods-custom-select .SumoSelect > .optWrapper .options .opt label {
  color: #fff;
  font-size: 15px;
  font-family: "Gotham";
  font-weight: 400;
  text-transform: none;
  line-height: 1.25;
}

.payment-methods-custom-select
  .SumoSelect.open
  > .optWrapper
  .options
  .opt
  label {
  margin: 0px;
  letter-spacing: 0.5px;
}

.payment-methods-wrapper .form-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.payment-methods-wrapper #add-payment-form button {
  height: 47px !important;
  /* Base button text styles applied above */
}

.payment-methods-wrapper #add-payment-form button.btn-secondary {
  border-color: #ff6984;
  color: #ff6984;
}

.cc-form-container:not(.hidden) > div.form-group:last-of-type {
  margin-bottom: 0px;
}

.cc-form-container .form-group.group-full-width.auto-pay-container {
  border-top: none;
}

.cc-form-container .form-group.cc-expiration,
.cc-form-container .form-group.cc-cvc {
  width: 47%;
  margin-bottom: 5px;
}

/* === Info Section === */
/*
.autopay-info-section h4 {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: "Gotham";
  font-weight: 500;
  font-size: 14px;
  color: #5ea9ff; 
  margin-bottom: 8px;
}

.payment-methods-wrapper .autopay-info-section h4:before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url(../images/icons/new-info-blue.svg) no-repeat center center;
  background-size: 20px 20px;
  margin-right: 8px;
  filter: brightness(0) saturate(100%) invert(56%) sepia(91%) saturate(638%)
    hue-rotate(176deg) brightness(94%) contrast(91%);
}
*/

.autopay-info-section h4 {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: "Gotham";
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #5ea9ff;
  margin-bottom: 5px;
}

.payment-methods-wrapper .autopay-info-section h4:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url(../images/icons/new-info-blue.svg) no-repeat center center;
  background-size: 18px 18px;
  margin-right: 8px;
  filter: brightness(0) saturate(100%) invert(56%) sepia(91%) saturate(638%)
    hue-rotate(176deg) brightness(94%) contrast(91%);
}

.payment-disabled-notice,
.payment-methods-disabled-notice {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  padding: 24px;
  margin: 20px 0;
  color: #ff6984;
  font-family: "Gotham";
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.payment-methods-disabled-notice strong,
.payment-disabled-notice strong {
  display: block;
  margin-bottom: 12px;
  font-size: 16px;
}

.payment-method-ach-disabled-notice,
.payment-method-card-disabled-notice {
  color: #ff6984;
  font-family: "Gotham";
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.5px;
}

.payment-method-ach-disabled-notice strong,
.payment-method-card-disabled-notice strong {
  display: block;
  font-size: 12px;
}

.payment-method-error-notice {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 6px;
  padding: 12px;
  margin-top: 16px;
  color: #ff6984;
  font-size: 12px;
}

.payment-methods-unavailable-notice {
  margin-top: 10px;
  font-size: 12px;
  color: #ff6984;
  text-align: center;
  font-weight: 400;
}

/* === Toggle Description States === */
.toggle-description-disabled.hidden,
.toggle-description-enabled.hidden {
  display: none !important;
}

/* === Autopay Info Text Color === */
.payment-methods-wrapper .autopay-info-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.autopay-info-section .info-content ul {
  margin: 0;
  padding-left: 24px;
  list-style-type: none;
}

/* .autopay-info-section .info-content li {
  font-size: 12px;
  color: #5ea9ff;
  line-height: 20px;
  position: relative;
  margin-bottom: 5px;
  font-weight: 400;
  padding-left: 20px;
} */

.autopay-info-section .info-content li {
  font-size: 12px;
  color: #5ea9ff;
  line-height: 20px;
  position: relative;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
  font-weight: 400;
  padding-left: 20px;
}

.payment-methods-wrapper .autopay-info-section .info-content li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #5ea9ff;
}

.payment-methods-wrapper
  .autopay-info-section
  .info-content
  p.cc-fee-info-note {
  font-size: 12px;
  color: #5ea9ff;
}

.cc-fee-info-note {
  margin-top: 20px;
  color: #5ea9ff;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.5px;
}

.payment-methods-wrapper .no-methods-message {
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

/* ============================================
   4. LOADING COMPONENT
   ============================================ */

.pm-loading {
  text-align: center;
  color: #888;
  font-family: "Gotham", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in;
}

.pm-loading:before {
  content: "";
  display: block;
  border-radius: 50%;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: #4caf50;
  animation: pm-spin 0.8s linear infinite;
}

/* Size Variants */
.pm-loading-small {
  padding: 20px;
  font-size: 13px;
  min-height: 100px;
}

.pm-loading-small:before {
  width: 20px;
  height: 20px;
  border-width: 2px;
  margin-bottom: 10px;
}

.pm-loading-medium {
  padding: 40px 20px;
  font-size: 14px;
  min-height: 200px;
}

.pm-loading-medium:before {
  width: 30px;
  height: 30px;
  border-width: 2.5px;
  margin-bottom: 15px;
}

.pm-loading-large {
  padding: 60px 20px;
  font-size: 16px;
  min-height: 350px;
}

.pm-loading-large:before {
  width: 40px;
  height: 40px;
  border-width: 3px;
  margin-bottom: 20px;
}

.pm-loading-xlarge {
  padding: 80px 20px;
  font-size: 18px;
  min-height: 500px;
}

.pm-loading-xlarge:before {
  width: 50px;
  height: 50px;
  border-width: 4px;
  margin-bottom: 25px;
}

/* Inline Variant */
.pm-loading-inline {
  flex-direction: row;
  min-height: auto !important;
  padding: 15px !important;
}

.pm-loading-inline:before {
  margin: 0 10px 0 0 !important;
  display: inline-block;
}

/* Context-Specific Loading */
.invoice-payment-form-container > .pm-loading {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: center;
  width: 100%;
  text-align: center;
}

/* #puser-invoice-frm .global-message-container {
  min-height: 48px;
} */

.payment-method-container .pm-loading {
  /* padding: 30px 20px; */
  background: transparent;
  margin-bottom: 20px;
}

/* Button States */
button[disabled] .fa-spinner {
  animation: pm-spin 0.8s linear infinite;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============================================
   5. ANIMATIONS
   ============================================ */

@keyframes pm-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }
  to {
    max-height: 300px;
    opacity: 1;
    overflow: visible;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* ============================================
   6. MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .shm-payment-form .btn-primary,
  .shm-payment-form .btn-secondary {
    height: 3rem !important;
  }

  /* Layout adjustments */
  .payment-methods-wrapper .payment-methods-form-container {
    width: 95%;
    padding: 20px;
  }

  .payment-methods-wrapper .back-btn {
    position: relative;
    left: 0;
    margin-bottom: 20px;
  }

  /* Other Amount Input Field - UPDATED */
  #puser-invoice-frm input[name="other_amount_input"],
  #puser-invoice-frm .otherAmountInput {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-top: 10px !important;
  }

  #puser-invoice-frm .otherAmountInputWrapper .label-text {
    display: block;
    margin-bottom: 8px;
  }

  /* Radio button alignment with Other Amount - NEW */
  #puser-invoice-frm .label-radio {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  #puser-invoice-frm .label-radio .label-text {
    width: 100%;
  }

  #puser-invoice-frm
    .label-radio
    input[type="radio"]:checked
    ~ .otherAmountInput {
    display: block !important;
    width: 100% !important;
    margin-top: 10px !important;
  }

  /* Credit Card Form Fields - NEW */
  .cc-form-container .form-group {
    width: 100% !important;
  }

  .cc-form-container.new-card-wrapper .form-group {
    width: 100% !important;
  }

  .cc-form-container .form-group:nth-child(3),
  .cc-form-container .form-group:nth-child(4) {
    width: 100% !important;
  }

  /* Form buttons */
  .payment-methods-wrapper .form-buttons,
  .payment-methods-wrapper .delete-confirmation-buttons,
  .autopay-selection-wrapper .confirmation-buttons {
    flex-direction: column;
  }

  .payment-methods-wrapper .delete-confirmation-buttons button,
  .autopay-selection-wrapper .confirmation-buttons button {
    width: 100%;
  }

  /* Toggle sections */
  .autopay-selection-wrapper .toggle-switch {
    align-self: flex-start;
  }

  /* Loading adjustments */
  .pm-loading {
    padding: 30px 15px;
  }

  .pm-loading-large,
  .pm-loading-xlarge {
    padding: 40px 15px;
    min-height: 250px;
  }

  .pm-loading-large:before,
  .pm-loading-xlarge:before {
    width: 35px;
    height: 35px;
  }
}

/* Tablet specific adjustments - NEW */
@media (min-width: 481px) and (max-width: 768px) {
  /* Keep expiration and CVV side by side on tablets if space allows */
  .cc-form-container .form-group:nth-child(3),
  .cc-form-container .form-group:nth-child(4) {
    width: 48% !important;
  }
}

/* Small mobile devices - NEW */
@media (max-width: 480px) {
  /* Stack all form fields on very small screens */
  .cc-form-container:not(.hidden) {
    display: block !important;
  }

  .cc-form-container .form-group {
    width: 100% !important;
    margin-bottom: 15px !important;
  }

  /* Other amount field specific */
  #puser-invoice-frm .otherAmountInputWrapper {
    position: relative;
  }

  #puser-invoice-frm input[name="other_amount_input"] {
    width: calc(100% - 48px) !important;
    margin-top: 8px !important;
  }
}

@media (max-width: 1023px) {
  .save-autopay-btn {
    font-size: 0; /* Hide original text */
    width: 100px; /* Allow button to shrink to content */
    min-width: auto !important; /* Remove any minimum width constraints */
    height: 40px;
  }

  .save-autopay-btn::before {
    content: "Enable";
    font-size: 11px; /* Restore font size for new text */
  }
}
