/* ============================================================
   PE_ORIGINALS — css/auth.css
   Styles for the auth modals (login/signup/forgot) and the
   checkout flow. Loaded after style.css on every page.
   ============================================================ */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(40, 10, 25, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.auth-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  padding: 34px 30px 30px;
  box-shadow: 0 30px 80px rgba(40, 10, 25, 0.28);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.auth-modal-overlay.open .auth-modal {
  transform: translateY(0) scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--blush-100, #fbeef4);
  color: var(--pink-700, #a52c60);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}
.auth-modal-close:hover {
  background: var(--blush-200, #f7dce8);
}

.auth-modal-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--ink-900, #2a0e1c);
  text-align: center;
  margin-bottom: 22px;
}
.auth-modal-brand em {
  font-style: italic;
  color: var(--pink-600, #c75b8c);
}

.auth-modal-form h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  margin: 0 0 6px;
  color: var(--ink-900, #2a0e1c);
  text-align: center;
}
.auth-modal-sub {
  font-size: 13.5px;
  color: var(--ink-500, #7a6a72);
  text-align: center;
  margin: 0 0 20px;
  line-height: 1.5;
}

.auth-modal-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700, #4a2f3c);
  margin: 0 0 14px;
}
.auth-modal-form input,
.auth-modal-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1.5px solid var(--line, #f0e0e8);
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  background: var(--blush-50, #fff9fb);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-modal-form input:focus,
.auth-modal-form textarea:focus {
  outline: none;
  border-color: var(--pink-400, #e08cb4);
  box-shadow: 0 0 0 4px rgba(224, 140, 180, 0.16);
}

.auth-modal-row {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 16px;
}
.auth-modal-link {
  color: var(--pink-600, #c75b8c);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.auth-modal-link:hover {
  text-decoration: underline;
}

.auth-modal-error {
  display: none;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecee;
  color: #b3261e;
  font-size: 13px;
  text-align: center;
}
.auth-modal-error.show {
  display: block;
}

.auth-modal-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-500, #7a6a72);
}
.auth-modal-foot .auth-modal-link {
  font-weight: 600;
}

/* ---- Checkout modal ---- */
.checkout-modal {
  max-width: 560px;
}
.co-sub {
  font-size: 13.5px;
  color: var(--ink-500, #7a6a72);
  margin: 0 0 18px;
}
.co-summary {
  border: 1px solid var(--line, #f0e0e8);
  border-radius: 14px;
  padding: 6px 14px;
  margin-bottom: 18px;
  background: var(--blush-50, #fff9fb);
  max-height: 220px;
  overflow-y: auto;
}
.co-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #f0e0e8);
}
.co-line:last-child {
  border-bottom: none;
}
.co-line img {
  width: 48px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.co-line-info {
  flex: 1;
  min-width: 0;
}
.co-line-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900, #2a0e1c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-line-meta {
  font-size: 12px;
  color: var(--ink-500, #7a6a72);
  margin-top: 2px;
}
.co-line-price {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pink-700, #a52c60);
  white-space: nowrap;
}

.co-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .co-grid {
    grid-template-columns: 1fr;
  }
}

.co-totals {
  margin: 16px 0 6px;
  display: grid;
  gap: 6px;
}
.co-totals > div {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-600);
}
.co-totals .co-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: 4px;
}
.co-totals .co-total span:last-child {
  font-family: var(--font-serif);
  color: var(--pink-600);
}
.co-totals .co-discount {
  color: #0b8a3a;
  font-weight: 600;
}
.co-coupon {
  display: flex;
  gap: 8px;
  margin: 12px 0 2px;
}
.co-coupon input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.co-coupon input:focus {
  outline: none;
  border-color: var(--pink-400);
}
.co-coupon input:disabled {
  background: var(--pink-50);
  opacity: .8;
}
.co-coupon .btn {
  white-space: nowrap;
  padding: 10px 16px;
}
.co-coupon-msg {
  font-size: 12.5px;
  color: #0b8a3a;
  margin: 6px 2px 0;
  min-height: 16px;
}

.co-pay-methods {
  display: grid;
  gap: 10px;
  margin: 16px 0 10px;
}
.co-pay {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--line, #f0e0e8);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.co-pay:hover {
  border-color: var(--pink-300, #f0b7d0);
}
.co-pay:has(input:checked) {
  border-color: var(--pink-500, #d96b9f);
  background: var(--blush-100, #fbeef4);
}
.co-pay input {
  accent-color: var(--pink-600, #c75b8c);
}

.co-note {
  font-size: 12.5px;
  color: var(--ink-500, #7a6a72);
  background: var(--blush-100, #fbeef4);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0 0;
}
.co-pay-detail {
  margin-top: 4px;
}
.co-bank-box {
  border: 1.5px dashed var(--pink-300, #f0b7d0);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 6px 0 10px;
  display: grid;
  gap: 6px;
}
.co-bank-box > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.co-bank-box span {
  color: var(--ink-500, #7a6a72);
}
.co-bank-box strong {
  color: var(--ink-900, #241a1e);
  letter-spacing: 0.2px;
}
.co-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.co-actions .btn-block {
  flex: 1;
}