/* --- Invites layer styles ------------------------------------------------
 *
 * Owned by the invites worker. Kept in a single stylesheet so the bento /
 * social / collab workers can extend their own CSS without conflict.
 *
 * Scoping: every rule targets a class prefixed with ``inv-`` so we don't
 * accidentally clash with the ambient design system.
 * -------------------------------------------------------------------------- */

/* ============================== Modal ================================== */

.inv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, 0.55);
  display: none;
  z-index: 8000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.inv-modal-backdrop.inv-open {
  display: flex;
}
.inv-modal {
  background: var(--card, #fff);
  color: var(--fg, #111);
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
}
.inv-modal-head {
  padding: 18px 22px 6px;
}
.inv-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}
.inv-modal-sub {
  font-size: 13px;
  color: var(--muted, #666);
  margin: 0;
}
.inv-modal-body {
  padding: 12px 22px 4px;
  display: grid;
  gap: 12px;
}
.inv-modal-actions {
  padding: 8px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.inv-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #888);
  float: right;
  margin: -4px -6px 0 0;
}
.inv-close:hover {
  color: var(--fg, #111);
}

/* Options grid: expiry, max-uses, label */
.inv-field {
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.inv-field label {
  font-weight: 600;
  color: var(--fg, #111);
}
.inv-field input[type="text"],
.inv-field select {
  padding: 8px 10px;
  border: 1px solid var(--border, #d8d8dc);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.inv-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Result panel — shown after mint */
.inv-result {
  display: none;
  border-top: 1px dashed var(--border, #e2e2e6);
  padding: 14px 22px 4px;
}
.inv-result.inv-show {
  display: block;
}
.inv-url-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.inv-url-row input {
  flex: 1;
  padding: 9px 11px;
  border: 1px solid var(--border, #d8d8dc);
  border-radius: 8px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px;
  background: #f7f7f9;
  color: #222;
}
.inv-copy-btn {
  border: 1px solid var(--border, #d8d8dc);
  background: #fff;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  min-width: 68px;
}
.inv-copy-btn.inv-copied {
  background: #eaf7ee;
  border-color: #2f6f4a;
  color: #2f6f4a;
}

/* Share sheet */
.inv-share {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inv-share a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border, #d8d8dc);
  color: var(--fg, #111);
  background: #fff;
}
.inv-share a:hover {
  background: #f2f4f7;
}
.inv-share .inv-glyph {
  font-size: 15px;
}

.inv-error {
  color: #a4322f;
  font-size: 13px;
  margin: 6px 0 0;
  display: none;
}
.inv-error.inv-show {
  display: block;
}

/* ============================== Landing =============================== */

.inv-landing-wrap {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 16px;
}
.inv-landing-card {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e6e6ea);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.25);
}
.inv-landing-banner {
  height: 160px;
  background: linear-gradient(135deg, #2f6f4a 0%, #7a8f3f 100%);
  background-size: cover;
  background-position: center;
}
.inv-landing-body {
  padding: 22px 24px 24px;
  position: relative;
}
.inv-landing-logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: #fff;
  border: 4px solid #fff;
  margin-top: -60px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #2f6f4a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.inv-landing-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.inv-landing-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 28px;
  margin: 14px 0 4px;
  line-height: 1.15;
  color: var(--fg, #111);
}
.inv-landing-meta {
  font-size: 13px;
  color: var(--muted, #666);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inv-landing-meta .inv-dot {
  color: #c0c0c8;
}
.inv-landing-desc {
  margin: 14px 0 20px;
  color: var(--fg, #222);
  line-height: 1.5;
}
.inv-landing-cta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.inv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
}
.inv-btn-primary {
  background: #2f6f4a;
  color: #fff;
}
.inv-btn-primary:hover {
  background: #26593c;
}
.inv-btn-ghost {
  background: transparent;
  color: var(--fg, #111);
  border-color: var(--border, #d8d8dc);
}
.inv-btn-ghost:hover {
  background: #f2f4f7;
}

.inv-landing-preview {
  margin-top: 24px;
  border-top: 1px solid var(--border, #e6e6ea);
  padding-top: 16px;
}
.inv-landing-preview-h {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted, #888);
  margin: 0 0 10px;
}
.inv-recent-post {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border, #e6e6ea);
}
.inv-recent-post:last-child {
  border-bottom: 0;
}
.inv-recent-post-t {
  font-weight: 600;
  color: var(--fg, #111);
  font-size: 14px;
  margin: 0 0 2px;
}
.inv-recent-post-m {
  font-size: 12px;
  color: var(--muted, #888);
}

.inv-landing-error {
  padding: 24px;
  text-align: center;
  color: var(--muted, #666);
}
.inv-landing-error h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--fg, #111);
}

/* ============================ Admin table ============================== */

.inv-admin-wrap {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}
.inv-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.inv-admin-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 24px;
  margin: 0;
}
.inv-admin-sub {
  color: var(--muted, #666);
  font-size: 13px;
  margin: 4px 0 0;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card, #fff);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border, #e6e6ea);
  font-size: 13px;
}
.inv-table th,
.inv-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border, #ececf0);
}
.inv-table thead th {
  background: #f7f8fa;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted, #666);
}
.inv-table tbody tr:last-child td {
  border-bottom: 0;
}
.inv-token {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 12px;
  background: #f2f4f7;
  padding: 2px 6px;
  border-radius: 6px;
  color: #333;
}
.inv-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.inv-status-active { background: #eaf7ee; color: #2f6f4a; }
.inv-status-revoked { background: #f9e7e6; color: #a4322f; }
.inv-status-expired { background: #f2f4f7; color: #666; }
.inv-status-exhausted { background: #fff3d6; color: #8a5a00; }

.inv-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.inv-users-list a {
  background: #f2f4f7;
  color: #333;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
}
.inv-users-list a:hover {
  background: #e6e8ec;
}

.inv-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted, #666);
  font-size: 14px;
}
