/* InvitationPro — front-end styles (invite page + host dashboard).
   Mobile-first, theme-independent, CSS-variable driven. */

:root {
	--ip-bg: #fbf7f4;
	--ip-surface: #ffffff;
	--ip-ink: #2a2320;
	--ip-muted: #8a7f78;
	--ip-line: #ece4de;
	--ip-brand: #b4654a;       /* warm terracotta */
	--ip-brand-ink: #8c4a34;
	--ip-accent: #d9a441;      /* gold */
	--ip-ok: #3f8f6b;
	--ip-danger: #c0564a;
	--ip-radius: 16px;
	--ip-shadow: 0 10px 30px rgba(60, 40, 30, .08);
	--ip-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--ip-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- base ---------- */
.ip-invite-body { margin: 0; background: var(--ip-bg); color: var(--ip-ink); font-family: var(--ip-sans); line-height: 1.6; }
.ip-invite, .ip-gate, .ip-dashboard { max-width: 780px; margin: 0 auto; padding: 0 16px; }
.ip-dashboard { max-width: 960px; padding-top: 24px; padding-bottom: 64px; }
.ip-h2 { font-family: var(--ip-serif); font-size: 1.7rem; text-align: center; margin: 0 0 8px; color: var(--ip-brand-ink); }
.ip-section { padding: 40px 0; border-bottom: 1px solid var(--ip-line); }
.ip-section:last-of-type { border-bottom: 0; }
.ip-meta { color: var(--ip-muted); font-size: .92rem; }
.ip-center { text-align: center; }
.ip-prose { max-width: 60ch; margin: 0 auto; text-align: center; }
a { color: var(--ip-brand-ink); }

/* ---------- buttons / forms ---------- */
.ip-btn {
	display: inline-block; cursor: pointer; border: 0; border-radius: 999px;
	background: var(--ip-brand); color: #fff; font-weight: 600; font-size: 1rem;
	padding: 12px 24px; text-decoration: none; transition: transform .08s ease, background .2s;
}
.ip-btn:hover { background: var(--ip-brand-ink); color: #fff; }
.ip-btn:active { transform: translateY(1px); }
.ip-btn--lg { padding: 14px 34px; font-size: 1.05rem; margin-top: 10px; }
.ip-btn--ghost { background: transparent; color: var(--ip-brand-ink); border: 1px solid var(--ip-brand); }
.ip-btn--ghost:hover { background: var(--ip-brand); color: #fff; }
.ip-btn--sm { padding: 8px 16px; font-size: .9rem; }
.ip-btn[disabled] { opacity: .5; cursor: default; }

.ip-card { background: var(--ip-surface); border: 1px solid var(--ip-line); border-radius: var(--ip-radius); box-shadow: var(--ip-shadow); padding: 24px; }
.ip-field { margin-bottom: 16px; text-align: left; }
.ip-field label, .ip-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.ip-field input, .ip-field textarea, .ip-field select {
	width: 100%; box-sizing: border-box; padding: 11px 13px; font: inherit;
	border: 1px solid var(--ip-line); border-radius: 10px; background: #fff;
}
.ip-field input:focus, .ip-field textarea:focus, .ip-field select:focus { outline: 2px solid var(--ip-accent); border-color: transparent; }
.ip-choice { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.ip-choice label { font-weight: 500; display: flex; align-items: center; gap: 6px; }
.ip-form-status { font-size: .92rem; margin: 12px 0 0; min-height: 1.2em; }
.ip-form-status.is-ok { color: var(--ip-ok); }
.ip-form-status.is-err { color: var(--ip-danger); }

/* ---------- hero ---------- */
.ip-hero { position: relative; text-align: center; padding: 64px 20px; border-radius: 0 0 28px 28px; overflow: hidden; background: linear-gradient(160deg, #fff 0%, var(--ip-bg) 100%); }
.ip-hero--cover { color: #fff; }
.ip-hero--cover::before { content: ""; position: absolute; inset: 0; background-image: var(--ip-cover); background-size: cover; background-position: center; }
.ip-hero--cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,8,.35), rgba(20,12,8,.62)); }
.ip-hero-inner { position: relative; z-index: 1; }
.ip-badge { display: inline-block; letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; font-weight: 700; padding: 5px 14px; border-radius: 999px; background: rgba(217,164,65,.18); color: var(--ip-accent); border: 1px solid currentColor; }
.ip-hero--cover .ip-badge { background: rgba(255,255,255,.14); color: #fff; }
.ip-hero-title { font-family: var(--ip-serif); font-size: clamp(2rem, 7vw, 3.4rem); margin: 16px 0 8px; line-height: 1.1; }
.ip-hero-date { font-size: 1.05rem; margin: 0; }
.ip-countdown { display: flex; justify-content: center; gap: 14px; margin: 18px 0 4px; font-variant-numeric: tabular-nums; }
.ip-count-unit { min-width: 56px; }
.ip-count-num { font-family: var(--ip-serif); font-size: 1.8rem; display: block; line-height: 1; }
.ip-count-lbl { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }

/* ---------- timeline ---------- */
.ip-timeline { list-style: none; margin: 24px auto 0; padding: 0; max-width: 560px; }
.ip-timeline-item { position: relative; padding: 0 0 26px 28px; border-left: 2px solid var(--ip-line); }
.ip-timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.ip-timeline-dot { position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--ip-accent); box-shadow: 0 0 0 4px var(--ip-bg); }
.ip-timeline-body h3 { font-family: var(--ip-serif); margin: 0 0 2px; font-size: 1.25rem; }
.ip-venue { margin: 4px 0; }

/* ---------- registry ---------- */
.ip-registry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.ip-gift { display: flex; flex-direction: column; }
.ip-gift h3 { font-size: 1.05rem; margin: 0 0 4px; }
.ip-gift .ip-price { color: var(--ip-brand-ink); font-weight: 700; }
.ip-gift .ip-progress { height: 6px; background: var(--ip-line); border-radius: 4px; margin: 10px 0; overflow: hidden; }
.ip-gift .ip-progress > span { display: block; height: 100%; background: var(--ip-accent); }
.ip-gift--claimed { opacity: .72; }
.ip-chip { display: inline-block; font-size: .72rem; padding: 2px 10px; border-radius: 999px; background: #eef5f0; color: var(--ip-ok); font-weight: 600; }
.ip-gift .ip-btn { margin-top: auto; }

/* ---------- share ---------- */
.ip-share-row { display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.ip-qr { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--ip-line); line-height: 0; }
.ip-share-url { width: min(260px, 70vw); padding: 10px 12px; border: 1px solid var(--ip-line); border-radius: 10px; margin-right: 8px; }
.ip-powered { text-align: center; color: var(--ip-muted); font-size: .85rem; margin-top: 28px; }
.ip-logo { font-family: var(--ip-serif); font-size: 1.3rem; color: var(--ip-brand-ink); margin-bottom: 8px; }
.ip-gate { min-height: 90vh; display: flex; align-items: center; }
.ip-gate .ip-card { width: 100%; }
.ip-gate-form { display: flex; gap: 8px; margin-top: 16px; }
.ip-gate-form input { flex: 1; padding: 11px 13px; border: 1px solid var(--ip-line); border-radius: 10px; }

/* ---------- dashboard ---------- */
.ip-loading { color: var(--ip-muted); text-align: center; padding: 40px; }
.ip-dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.ip-dash-head h1 { font-family: var(--ip-serif); color: var(--ip-brand-ink); margin: 0; font-size: 1.8rem; }
.ip-event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.ip-event-card { cursor: pointer; transition: box-shadow .2s, transform .08s; }
.ip-event-card:hover { box-shadow: 0 14px 34px rgba(60,40,30,.14); transform: translateY(-2px); }
.ip-event-card h3 { font-family: var(--ip-serif); margin: 0 0 6px; }
.ip-stat-row { display: flex; gap: 18px; margin-top: 12px; }
.ip-stat { text-align: center; }
.ip-stat b { display: block; font-size: 1.5rem; color: var(--ip-brand-ink); font-family: var(--ip-serif); }
.ip-stat span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ip-muted); }
.ip-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--ip-line); margin: 20px 0; flex-wrap: wrap; }
.ip-tab { background: none; border: 0; padding: 10px 14px; cursor: pointer; font: inherit; color: var(--ip-muted); border-bottom: 2px solid transparent; }
.ip-tab.is-active { color: var(--ip-brand-ink); border-bottom-color: var(--ip-brand); font-weight: 600; }
.ip-table { width: 100%; border-collapse: collapse; }
.ip-table th, .ip-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--ip-line); font-size: .92rem; }
.ip-table th { color: var(--ip-muted); font-weight: 600; }
.ip-pill { font-size: .72rem; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.ip-pill--accepted { background: #eaf6ef; color: var(--ip-ok); }
.ip-pill--declined { background: #fbeceb; color: var(--ip-danger); }
.ip-pill--pending, .ip-pill--maybe { background: #f3eee9; color: var(--ip-muted); }
.ip-row-actions { display: flex; gap: 8px; }
.ip-back { background: none; border: 0; color: var(--ip-muted); cursor: pointer; font: inherit; padding: 4px 0; margin-bottom: 8px; }
.ip-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ip-empty { text-align: center; color: var(--ip-muted); padding: 30px; }

/* ---------- modal ---------- */
.ip-modal-backdrop { position: fixed; inset: 0; background: rgba(30,20,14,.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 9999; }
.ip-modal { background: var(--ip-surface); border-radius: var(--ip-radius); width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 24px; }
.ip-modal h2 { font-family: var(--ip-serif); color: var(--ip-brand-ink); margin-top: 0; }

@media (max-width: 560px) {
	.ip-grid-2 { grid-template-columns: 1fr; }
	.ip-table thead { display: none; }
	.ip-table td { display: block; border: 0; padding: 2px 0; }
	.ip-table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--ip-line); }
}
