/* ============================================================
   PrintCraft — Forms & Buttons
   assets/css/forms.css
   Shared across all pages: shop, contact, admin, policy, etc.
   ============================================================ */

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-primary:hover {
  background: var(--ink2);
  border-color: var(--ink2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--ink2);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-gold {
  background: var(--gold);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition);
}
.btn-gold:hover { background: #b8995e; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: var(--paper2);
  color: var(--text);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--paper3);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: var(--sand); background: var(--paper3); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; border-radius: 8px; }

.btn-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper2);
  border: 1px solid var(--paper3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--paper3); border-color: var(--sand); }

/* ── Form layout ─────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--paper3);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  font-family: inherit;
  outline: none;
  appearance: none;
  transition: border-color var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus  { border-color: var(--ink2); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text3); }
.form-textarea { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text3);
  margin-top: 0.3rem;
}
.form-error {
  font-size: 0.75rem;
  color: var(--terracotta);
  margin-top: 0.3rem;
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.5;
}
.alert-error   { background: #fef0ed; border: 1px solid #f4c9c1; color: #8b2316; }
.alert-success { background: #edf7f0; border: 1px solid #c1e8cb; color: #1a5c2a; }
.alert-info    { background: #f0f4fe; border: 1px solid #c5d3f8; color: #1a3a8a; }
.alert-icon    { flex-shrink: 0; }

/* ── Auth form extras ────────────────────────────────────── */
.auth-toggle {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text2);
}
.auth-toggle a { color: var(--forest); font-weight: 700; cursor: pointer; }
.auth-toggle a:hover { text-decoration: underline; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text3);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--paper3); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
}
.oauth-btn { transition: border-color 0.15s; }
.oauth-google:hover  { border-color: #4285f4 !important; }
.oauth-facebook:hover { border-color: #1877f2 !important; }
