/* ---- APP PAGES (generator + dashboard) ---- */
/* Inherits theme tokens from theme.css */

/* ---- SHARED NAV LINK ---- */
.nav a {
  text-decoration: none;
  color: inherit;
}

.nav-cta {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent) !important;
  border: 1px solid rgba(255, 61, 90, 0.35);
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  transition: background 0.2s, border-color 0.2s;
}

.nav-cta:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

/* ---- GENERATOR FORM PAGE ---- */
.gen-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.gen-header {
  margin-bottom: 3rem;
}

.gen-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.gen-sub {
  color: var(--fg-muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 480px;
}

.gen-error {
  background: rgba(255, 61, 90, 0.1);
  border: 1px solid rgba(255, 61, 90, 0.3);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  color: #ff6b82;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gen-error-icon { font-size: 1rem; }

/* ---- FORM ELEMENTS ---- */
.gen-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.form-row { display: flex; flex-direction: column; }

.form-group { display: flex; flex-direction: column; gap: 0.6rem; }

.form-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
}

.form-input {
  background: var(--bg-card);
  border: 1px solid rgba(138, 135, 160, 0.2);
  border-radius: 12px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}

.form-input::placeholder { color: rgba(138, 135, 160, 0.5); }

.form-input:focus {
  border-color: rgba(255, 61, 90, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 61, 90, 0.08);
}

.form-textarea { resize: vertical; min-height: 80px; line-height: 1.55; }

.form-hint {
  font-size: 0.78rem;
  color: rgba(138, 135, 160, 0.55);
}

/* ---- BUSINESS TYPE GRID ---- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.type-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(138, 135, 160, 0.15);
  border-radius: 12px;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.type-card:hover {
  border-color: rgba(255, 61, 90, 0.35);
  background: var(--bg-elevated);
}

.type-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 61, 90, 0.08);
}

.type-icon { font-size: 1.6rem; }

.type-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: var(--fg-muted);
  line-height: 1.3;
}

.type-card:has(input:checked) .type-label { color: var(--fg); }

/* ---- SUBMIT BUTTON ---- */
.gen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border: none;
  border-radius: 12px;
  padding: 1rem 1.75rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
  align-self: flex-start;
}

.gen-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.gen-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-arrow { font-size: 1.1rem; transition: transform 0.2s; }
.gen-btn:hover .btn-arrow { transform: translateX(3px); }

/* ---- PREVIEW PILLS ---- */
.gen-preview-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.gen-preview-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
  border: 1px solid rgba(138, 135, 160, 0.2);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
}

.pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pill-dot.red { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.pill-dot.yellow { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.pill-dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }

/* ---- GENERATING OVERLAY ---- */
.generating-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.generating-overlay.active { display: flex; }

.generating-card {
  background: var(--bg-card);
  border: 1px solid rgba(138, 135, 160, 0.15);
  border-radius: 20px;
  padding: 3rem 3.5rem;
  text-align: center;
  max-width: 360px;
}

.generating-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(255, 61, 90, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.generating-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.generating-sub {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

/* ---- DASHBOARD PAGE ---- */
.dash-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(138, 135, 160, 0.12);
}

.dash-biz-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-biz-emoji {
  font-size: 2rem;
  width: 56px; height: 56px;
  background: var(--bg-card);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-biz-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-biz-type {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-top: 0.15rem;
}

.dash-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dash-count-pill {
  font-size: 0.8rem;
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  border: 1px solid;
}

.dash-count-pill.red { border-color: rgba(255, 61, 90, 0.4); color: var(--accent); background: rgba(255, 61, 90, 0.08); }
.dash-count-pill.yellow { border-color: rgba(255, 210, 63, 0.35); color: var(--yellow); background: rgba(255, 210, 63, 0.07); }
.dash-count-pill.green { border-color: rgba(61, 255, 160, 0.3); color: var(--green); background: rgba(61, 255, 160, 0.06); }

/* ---- TABS ---- */
.tab-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(138, 135, 160, 0.12);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1rem 0.85rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--fg); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- CONTENT CARDS ---- */
.content-card {
  background: var(--bg-card);
  border: 1px solid rgba(138, 135, 160, 0.1);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}

.content-card:hover { border-color: rgba(138, 135, 160, 0.22); }

.card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.card-num {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 61, 90, 0.1);
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  flex: 1;
}

.copy-btn {
  margin-left: auto;
  background: rgba(138, 135, 160, 0.1);
  border: 1px solid rgba(138, 135, 160, 0.2);
  border-radius: 8px;
  color: var(--fg-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(255, 61, 90, 0.12);
  color: var(--accent);
  border-color: rgba(255, 61, 90, 0.3);
}

/* ---- BLOCK LABELS ---- */
.block-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(138, 135, 160, 0.55);
  margin-bottom: 0.5rem;
}

/* REEL CARDS */
.hook-block {
  background: rgba(255, 61, 90, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.hook-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.45;
  font-style: italic;
}

.script-block { margin-bottom: 1rem; }

.script-text {
  color: var(--fg-muted);
  font-size: 0.93rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.teaser-block {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.teaser-text {
  font-size: 0.9rem;
  color: var(--fg);
  font-style: italic;
}

/* CAPTION CARDS */
.captions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.caption-card { margin-bottom: 0; }

.caption-day {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--yellow);
}

.caption-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--fg);
  margin-bottom: 1rem;
  white-space: pre-wrap;
}

.hashtag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hashtag {
  font-size: 0.75rem;
  color: var(--blue);
  background: rgba(61, 139, 255, 0.1);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}

/* GRAPHIC CARDS */
.format-badge {
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green);
  background: rgba(61, 255, 160, 0.1);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  margin-left: auto;
}

.visual-block { margin-bottom: 1rem; }

.visual-text {
  color: var(--fg-muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

.copy-block {
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 1rem;
}

.copy-text-content {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  color: var(--fg);
  line-height: 1.4;
}

/* ---- COPY TOAST ---- */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--green);
  color: #0a0a0f;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- DASHBOARD FOOTER ---- */
.dash-footer {
  margin-top: 3rem;
  text-align: center;
  display: flex;
  justify-content: center;
}

.dash-gen-again { align-self: center; }

/* ---- RESPONSIVE ---- */
@media (max-width: 680px) {
  .gen-page { padding: 3rem 1.25rem 5rem; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-page { padding: 2rem 1.25rem 4rem; }
  .dash-header { flex-direction: column; align-items: flex-start; }
  .captions-grid { grid-template-columns: 1fr; }
  .tab-btn { font-size: 0.8rem; padding: 0.65rem 0.75rem 0.75rem; }
}
