/* ═══════════════════════════════════════════════════════════════════════
   Guest Invoice Builder — hero tabs, builder panel, sign-up modal
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Hero tabs ──────────────────────────────────────────────────────── */
.hero-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-top: 1.75rem;
}
.hero-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 1.3rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.42);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
  margin-bottom: -1px;
  white-space: nowrap;
}
.hero-tab:hover {
  color: rgba(255,255,255,0.75);
}
.hero-tab.active {
  color: #fff;
  border-bottom-color: #00d4ff;
}

/* ─── Builder section wrapper ────────────────────────────────────────── */
#guest-builder-section {
  background: #f1f5f9;
  padding: 2.25rem 0 3rem;
}
#guest-builder-section .gib-intro {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: #64748b;
}

/* ─── Two-column wrap ────────────────────────────────────────────────── */
.gib-wrap {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.gib-form-col {
  flex: 1;
  min-width: 0;
}
.gib-preview-col {
  width: 370px;
  flex-shrink: 0;
}
@media (max-width: 1024px) {
  .gib-preview-col { display: none; }
}

/* ─── Builder card ───────────────────────────────────────────────────── */
.gib-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.07);
  padding: 1.6rem;
}
.gib-header-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.gib-group {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.9rem;
  min-width: 0;
}
.gib-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}
.gib-input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  color: #0f172a;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.gib-input:focus {
  border-color: #00d4ff;
  background: #fff;
}
.gib-input[readonly] {
  cursor: default;
  color: #94a3b8;
}
textarea.gib-input {
  resize: vertical;
  min-height: 56px;
}
.gib-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 1rem 0;
}
.gib-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

/* ─── Line items ─────────────────────────────────────────────────────── */
.gib-items-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  padding: 0 0.1rem;
}
.gib-item-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.gib-item-desc { flex: 1; min-width: 0; }
.gib-item-qty  { width: 58px !important; text-align: center !important; }
.gib-item-price { width: 96px !important; text-align: right !important; }
.gib-item-total-cell {
  width: 96px;
  text-align: right;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  flex-shrink: 0;
}
.gib-remove-btn {
  background: none;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
}
.gib-remove-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}
.gib-add-btn {
  background: none;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.48rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  margin-top: 0.3rem;
}
.gib-add-btn:hover {
  border-color: #00d4ff;
  color: #00d4ff;
  background: rgba(0,212,255,0.03);
}

/* ─── Totals ─────────────────────────────────────────────────────────── */
.gib-totals { margin-top: 0.5rem; }
.gib-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.42rem 0;
  font-size: 0.88rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}
.gib-total-row:last-child { border-bottom: none; }
.gib-total-due {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  padding-top: 0.65rem;
}
.gib-total-due span:last-child {
  font-family: 'DM Mono', monospace;
  color: #00d4ff;
}
.gib-tax-input {
  width: 56px !important;
  display: inline-block !important;
  padding: 0.28rem 0.4rem !important;
  text-align: center !important;
  margin: 0 2px;
}

/* ─── Action buttons ─────────────────────────────────────────────────── */
.gib-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
@media (max-width: 560px) {
  .gib-actions { flex-direction: column; }
  .gib-header-row { flex-direction: column; gap: 0; }
}

/* ─── Live preview card ──────────────────────────────────────────────── */
.gib-preview-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.07);
  padding: 1.5rem;
  position: sticky;
  top: 84px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.gib-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 2px solid #00d4ff;
}
.gib-preview-brand {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}
.gib-preview-brand span { color: #00d4ff; }
.gib-preview-from-to {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.gib-preview-items-header {
  display: flex;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.2rem;
}
.gib-preview-item-row {
  display: flex;
  padding: 0.3rem 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 0.78rem;
}
.gib-preview-totals {
  margin-top: 0.65rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.45rem;
}
.gib-preview-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #475569;
  padding: 0.18rem 0;
}
.gib-preview-grand-total {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  border-top: 1px solid #e2e8f0;
  margin-top: 0.3rem;
  padding-top: 0.45rem;
}
.gib-preview-grand-total span:last-child {
  font-family: 'DM Mono', monospace;
  color: #00d4ff;
}
.gib-preview-footer {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.62rem;
  color: #cbd5e1;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}
.gib-preview-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 2px;
}
.gib-preview-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: #0f172a;
}
.gib-preview-email {
  font-size: 0.72rem;
  color: #64748b;
}

/* ─── Sign-up modal overlay ──────────────────────────────────────────── */
#gib-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.gib-modal-card {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.gib-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  color: #94a3b8;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  line-height: 1;
}
.gib-modal-close:hover { background: #f1f5f9; color: #0f172a; }
.gib-modal-emoji { font-size: 2.4rem; text-align: center; margin-bottom: 0.4rem; }
.gib-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 0 0 0.45rem;
}
.gib-modal-sub {
  font-size: 0.86rem;
  color: #64748b;
  text-align: center;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}
.gib-modal-field { margin-bottom: 0.8rem; }
.gib-modal-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.28rem;
}
.gib-modal-input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: #0f172a;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.gib-modal-input:focus { border-color: #00d4ff; background: #fff; }
.gib-field-error {
  display: block;
  font-size: 0.74rem;
  color: #ef4444;
  margin-top: 0.22rem;
  min-height: 0;
}
.gib-modal-btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
  margin-top: 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.gib-modal-divider {
  display: flex;
  align-items: center;
  margin: 1rem 0;
  color: #94a3b8;
  font-size: 0.8rem;
}
.gib-modal-divider::before,
.gib-modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.gib-modal-divider span { padding: 0 0.75rem; }
.gib-google-btn {
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.68rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: background 0.15s, border-color 0.15s;
}
.gib-google-btn:hover { background: #f8fafc; border-color: #94a3b8; }
.gib-modal-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 1rem;
}
.gib-modal-footer a { color: #00d4ff; text-decoration: none; font-weight: 600; }
.gib-modal-footer a:hover { text-decoration: underline; }
.gib-alert {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-size: 0.83rem;
  margin-bottom: 0.9rem;
  line-height: 1.5;
}
.gib-alert a { color: inherit; font-weight: 600; }
.gib-alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.gib-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }

/* ─── Email gate modal extras ────────────────────────────────────────── */
.gib-modal-benefits {
  list-style: none;
  margin: 1rem 0 1.25rem;
  padding: 0;
}
.gib-modal-benefits li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: #374151;
  padding: 0.22rem 0;
}
.gib-benefit-check {
  color: #16a34a;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1rem;
}
.gib-modal-skip {
  text-align: center;
  margin-top: 1rem;
}
.gib-modal-skip a {
  font-size: 0.82rem;
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gib-modal-skip a:hover { color: #374151; }

/* ─── Print: show only invoice preview ───────────────────────────────── */
@media print {
  .site-header, .mobile-nav, .hero, .stats-bar,
  .section, .section-white, .section-alt, footer,
  .gib-intro, .gib-form-col, #gib-modal-overlay { display: none !important; }
  body { background: white !important; }
  #guest-builder-section { padding: 0 !important; background: white !important; }
  .gib-wrap { display: block !important; }
  .gib-preview-col {
    display: block !important;
    width: 100% !important;
    max-width: 580px !important;
    margin: 0 auto !important;
  }
  .gib-preview-card { box-shadow: none !important; border: 1px solid #e2e8f0 !important; }
}
