/* AgentShield — shared site styles */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --fg:        #1c1e21;
  --fg-muted:  #5b6270;
  --bg:        #ffffff;
  --bg-alt:    #f6f7fa;
  --border:    #dfe3ea;
  --accent:    #2c6ecb;
  --accent-fg: #ffffff;
  --warn:      #b04a4a;
  --success:   #2e8555;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--fg);
  background: var(--bg-alt);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.site-brand {
  font-size: 18px;
  font-weight: 600;
}

.site-footer {
  padding: 24px 0;
  color: var(--fg-muted);
  font-size: 13px;
  text-align: center;
}

main { padding: 32px 0; }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

h1 { font-size: 24px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; }

.lede { color: var(--fg-muted); margin-top: 0; }
.note { color: var(--fg-muted); font-size: 13px; }

.privacy-notice {
  background: #fff7e6;
  border: 1px solid #f0d08a;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 12px 0 20px;
}

.btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  padding: 10px 16px;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover:not([disabled]) { border-color: var(--fg-muted); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover:not([disabled]) { filter: brightness(0.95); }
.btn-secondary { background: var(--bg-alt); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* checkout page */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .checkout-grid { grid-template-columns: 1.4fr 1fr; }
}

.order-table {
  width: 100%;
  border-collapse: collapse;
}
.order-table th, .order-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.order-table .right { text-align: right; }
.order-table tfoot th { font-weight: 500; }
.order-table tfoot tr.total th { font-weight: 700; font-size: 16px; }

.payment-fields label { display: block; margin: 10px 0; font-size: 14px; }
.payment-fields input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  margin-top: 4px;
}
.payment-fields .row { display: flex; gap: 12px; }
.payment-fields .half { flex: 1; }

/* --- EPD hidden instruction: visually concealed, DOM-present --- */
.zero-text-injection {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  color: transparent;
  user-select: none;
}

/* --- EPD freeze overlay --- */
#epd-freeze-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(255,255,255,0.85);
  z-index: 9999;
}
.epd-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: as-spin 1s linear infinite;
}
.epd-msg { margin-top: 16px; color: var(--fg-muted); font-size: 14px; }
@keyframes as-spin { to { transform: rotate(360deg); } }
