/* =========================================================
   Public Payment Modal - matches current public-payment-modal.js
   ========================================================= */

.public-payment-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  font-family: "Montserrat", sans-serif;
}

.public-payment-modal.is-open {
  display: flex;
}

.public-payment-backdrop {
  position: absolute;
  inset: 0;
}

.public-payment-card {
  position: relative;
  /* width: min(720px, 96vw);
  max-height: 88vh; */
  width: min(480px, 76vw);
  max-height: 68vh;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.public-payment-header {
  background: linear-gradient(90deg, #c96b25 0%, #9f2a22 100%);
  color: #fff;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.public-payment-header h2,
.public-payment-header h3,
.public-payment-header p {
  margin: 0;
  color: #fff;
}

.public-payment-header h2 {
  font-size: 16px;
  line-height: 1.15;
  font-weight: 600;
}

.public-payment-header h3 {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 400;
}

.public-payment-header p {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.15;
}

.public-payment-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1.5;
  cursor: pointer;
}

.public-payment-body {
  padding: 18px 22px;
  overflow-y: auto;
}

.public-payment-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5efe2;
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.public-payment-avatar {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: #ad3f22;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
}

.public-payment-user strong {
  display: block;
  color: #2e2622;
  font-size: 12px;
  line-height: 1.1;
}

.public-payment-user span {
  display: block;
  margin-top: 1px;
  color: #927f70;
  font-size: 10px;
}

.public-payment-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #d8ccb9;
}

.public-payment-line strong {
  color: #2e2622;
  font-size: 12px;
  line-height: 1.1;
}

.public-payment-line span {
  display: block;
  margin-top: 1px;
  color: #927f70;
  font-size: 10px;
}

.public-payment-line > strong {
  white-space: nowrap;
  color: #6d5b4d;
}

.public-payment-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 8px solid #f5efe2;
  font-size: 12px;
  font-weight: 600;
  color: #2e2622;
}

.public-payment-method {
  margin-top: 12px;
}

.public-payment-method h3 {
  margin: 0 0 10px;
  color: #2e2622;
  font-size: 12px;
  font-weight: 700;
}

.public-payment-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.public-payment-method-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  border: 1px solid #d7d0c4;
  border-radius: 14px;
  padding: 8px 8px;
  cursor: pointer;
  background: #fffaf3;
}

.public-payment-method-card.selected {
  border-color: #d26b25;
  background: #fff7ec;
}

.public-payment-method-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.public-payment-method-card input {
  width: 12px;
  height: 12px;
  accent-color: #d26b25;
}

.public-payment-method-card span {
  color: #2e2622;
  font-size: 12px;
  font-weight: 600;
}

.public-payment-method-card small {
  display: block;
  margin-top: 1.2px;
  color: #927f70;
  font-size: 10px;
  font-weight: 600;
}

#publicPaymentError {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff1f0;
  border: 1px solid #efb4ad;
  color: #9f231d;
  font-size: 12px;
  font-weight: 500;
}

.public-payment-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: #f5efe2;
  border-top: 1.5px solid #6d5b4d;
  padding: 8px 10px;
}

.public-payment-footer .btn {
  width: 100%;
  min-height: 30px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.public-payment-footer .btn.outline {
  background: #fff;
  color: #8f2b23;
  border: 1.5px solid #9f3327;
}

.public-payment-footer .btn.primary {
  background: linear-gradient(90deg, #ca7b36 0%, #9f3327 100%);
  color: #fff;
  border: 0;
}

.public-payment-footer .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .public-payment-card {
    width: 96vw;
  }

  .public-payment-method-grid,
  .public-payment-footer {
    grid-template-columns: 1fr;
  }

  .public-payment-header,
  .public-payment-body,
  .public-payment-footer {
    padding-left: 8px;
    padding-right: 10px;
  }
}

.public-payment-method-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f7f3ed;
  border-color: #ddd2c4;
}

.public-payment-method-card.disabled .public-payment-method-radio {
  border-color: #aaa;
}

.public-payment-method-card.disabled strong,
.public-payment-method-card.disabled small,
.public-payment-method-card.disabled .public-payment-method-icon {
  color: #9a8b7d;
}

.public-payment-modal .btn {
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 20px;
  padding: 0.25rem 0.8rem;
}

.public-payment-modal .public-payment-footer .btn {
  font-size: 0.8rem;
}