/* ===============================
   WC Affirmation Generator
   Warm sunset layout + spacing fix
   =============================== */

/* ---------- PAGE WRAPPER ---------- */

.wc-page {
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 32px 0 56px;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at top, #1f2140 0, #0b1020 42%, #040813 78%, #020309 100%);
  color: #f9fafb;
}

/* Container with the card layout */
.wc-app {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  background: linear-gradient(
    145deg,
    rgba(13, 18, 38, 0.98),
    rgba(7, 11, 26, 0.98)
  );
  border-radius: 28px;
  padding: 26px 20px 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.88),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(16px);
  box-sizing: border-box;
}

/* Desktop: two columns */
@media (min-width: 900px) {
  .wc-app {
    padding: 32px 32px 34px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 22px;
  }
}

/* Mobile / tablet: stacked */
@media (max-width: 740px) {
  .wc-app {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}

.wc-left,
.wc-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- HEADER ---------- */

.wc-header {
  grid-column: 1 / -1;
  margin-bottom: 10px;
}

.wc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fed7aa;
  background: rgba(248, 171, 104, 0.14);
  border-radius: 999px;
  padding: 5px 11px;
  border: 1px solid rgba(252, 211, 77, 0.45);
}

.wc-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #fed7aa;
  box-shadow: 0 0 12px rgba(248, 171, 104, 0.9);
}

.wc-title {
  margin-top: 12px;
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wc-subtitle {
  margin-top: 8px;
  font-size: 0.96rem;
  max-width: 560px;
  color: #e5e7eb;
  line-height: 1.6;
}

/* ---------- CARDS ---------- */

.wc-card {
  background: radial-gradient(circle at top, #141830 0, #070b18 80%);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 255, 0.3);
  padding: 18px 16px 20px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .wc-card {
    padding: 20px 18px 22px;
  }
}

.wc-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.wc-card-title {
  font-size: 1rem;
  font-weight: 600;
}

.wc-pill {
  font-size: 0.7rem;
  color: #c7d2fe;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 255, 0.4);
  padding: 3px 9px;
  opacity: 0.95;
}

/* ---------- CATEGORY BUTTONS ---------- */

.wc-category-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

@media (min-width: 520px) {
  .wc-category-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cat-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 255, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.78rem;
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  text-align: center;
}

.cat-btn:hover {
  border-color: rgba(251, 191, 36, 0.7);
}

.cat-btn.active {
  background: radial-gradient(circle at top, #fed7aa 0, #f97316 55%, #ea580c 100%);
  color: #1f1303;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.9);
  border-color: transparent;
}

/* ---------- AFFIRMATION DISPLAY ---------- */

.manifest-box {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 255, 0.6);
  background:
    radial-gradient(circle at top, #1e293b 0, #020617 60%);
  padding: 18px 14px;
  margin-top: 4px;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.manifest-box::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(251, 191, 36, 0.18), transparent 65%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.2), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.manifest-text {
  position: relative;
  font-size: 1rem;
  text-align: center;
  line-height: 1.6;
  padding: 0 10px;
}

.wc-hint {
  font-size: 0.78rem;
  color: #e5e7eb;
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}

.wc-btn-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */

.wc-btn-primary,
.wc-btn-ghost {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.wc-btn-primary {
  background: linear-gradient(130deg, #f97316, #f97316, #facc15);
  color: #1f1303;
  font-weight: 600;
  box-shadow:
    0 0 20px rgba(251, 191, 36, 0.65),
    0 12px 32px rgba(0, 0, 0, 0.9);
}

.wc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 24px rgba(251, 191, 36, 0.8),
    0 14px 36px rgba(0, 0, 0, 0.95);
}

.wc-btn-ghost {
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  border-color: rgba(148, 163, 255, 0.6);
}

.wc-btn-ghost:hover {
  border-color: rgba(251, 191, 36, 0.7);
}

.wc-btn-primary:active,
.wc-btn-ghost:active {
  transform: translateY(0);
  box-shadow: none;
}

.wc-btn-icon {
  font-size: 1.05rem;
}

/* ---------- BUILDER SECTIONS ---------- */

.wc-section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #c7d2fe;
  margin-bottom: 4px;
  opacity: 0.95;
}

.wc-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

@media (min-width: 640px) {
  .wc-builder-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.wc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wc-field label {
  font-size: 0.78rem;
  color: #cbd5f5;
}

/* Inputs / selects (kept in case you add inputs later) */
.wc-card select,
.wc-card input[type="text"] {
  width: 100%;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 255, 0.6);
  background: rgba(15, 23, 42, 0.98);
  color: #f9fafb;
  padding: 7px 10px;
  font-size: 0.8rem;
  outline: none;
}

.wc-card select:focus,
.wc-card input[type="text"]:focus {
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.7);
}

/* Custom line output / generic box */
.builder-output {
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 255, 0.8);
  padding: 10px 10px;
  min-height: 64px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.98);
  position: relative;
  overflow: hidden;
}

.builder-output::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 10% 0,
    rgba(251, 191, 36, 0.28),
    transparent 60%
  );
  opacity: 0.7;
  pointer-events: none;
}

.builder-output span {
  position: relative;
  padding: 0 4px;
}

/* Three-line generator layout */
.three-line-output {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.three-line-row {
  margin-bottom: 4px;
}

.three-line-label {
  font-weight: 600;
  opacity: 0.85;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.three-line-text {
  font-size: 0.95rem;
}

/* Tiny notes / tips (mobile-friendly) */
.wc-tiny-note {
  font-size: 0.74rem;
  line-height: 1.5;
  margin-top: 6px;
  color: #e5e7eb;
  opacity: 0.9;
}

/* ---------- ANIMATION ---------- */

.fade-in {
  animation: fadeIn 250ms ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- FOOTER TEXT ---------- */

.wc-footer {
  margin-top: 12px;
  font-size: 0.72rem;
  color: #9ca3af;
  text-align: center;
  opacity: 0.8;
}

/* MOBILE FIXES */
@media (max-width: 768px) {
  .wc-affirmation-wrapper {
    padding: 20px 14px;
  }

  .wc-card {
    padding: 18px 16px;
  }

  .wc-btn {
    width: 100%;
    justify-content: center;
  }
}

/* DESKTOP WIDTH IMPROVEMENT */
@media (min-width: 1024px) {
  .wc-affirmation-wrapper {
    max-width: 1150px;
    margin: 0 auto;
  }
}

/* FULL PAGE MODE FOR GENERATOR */
.wc-fullpage {
  background: radial-gradient(circle at top, #1f2340 0, #050816 45%, #000 100%);
  padding: 40px 0;
}

/* REMOVE WHITE PAGE BACKGROUND */
body.page {
  background: #0d0f1a !important;   /* dark navy */
}

/* REMOVE EXTRA WP CONTENT SPACING */
.entry-content {
  padding: 0 !important;
  margin: 0 !important;
}

/* --- FULL-PAGE DARK BACKGROUND FOR THE SITE --- */
body {
  background: radial-gradient(circle at top, #1b2240 0%, #050816 55%, #02010a 100%);
  color: #f5f5ff;
}

/* Remove the white page box so the background shows */
.wp-site-blocks {
  background: transparent;
}

/* Hide only the footer on the front end */
footer.site-footer,
footer.wp-block-template-part {
  display: none !important;
}

/* ===== MOBILE FIXES (no side-scroll, nicer hero) ===== */
@media (max-width: 768px) {
  .wc-affirmation-wrapper {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }

  /* Hero title + subtitle centering on mobile (if used) */
  .wc-hero-title {
    font-size: 1.9rem;
    line-height: 1.1;
    text-align: center;
  }

  .wc-hero-subtitle {
    font-size: 0.95rem;
    text-align: center;
  }
}

/* --- MOBILE ALIGNMENT FIX --- */
@media (max-width: 768px) {

  /* Keep the generator centered but not wider than the screen */
  .wc-fullpage,
  .wc-fullpage .wp-block-shortcode,
  #wc-affirmation-app {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ===== HARD MOBILE FIX FOR CUT-OFF CONTENT ===== */
@media (max-width: 768px) {

  html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
  }

  /* Stop WordPress wrappers from being wider than the screen */
  .wp-site-blocks,
  .entry-content,
  .wp-block-post-content,
  .wp-block-group {
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Keep your generator nicely centered and inside the viewport */
  .wc-fullpage,
  .wc-affirmation-wrapper,
  #wc-affirmation-app,
  .wc-app {
    box-sizing: border-box;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ===== GLOBAL NO-CUT-OFF FIX ===== */
html,
body,
.wp-site-blocks {
  max-width: 100% !important;
  overflow-x: visible !important;   /* allow content to show instead of clipping */
}

/* Make sure the app never goes wider than the screen on phones */
@media (max-width: 768px) {
  .wc-page,
  .wc-fullpage,
  .wc-affirmation-wrapper,
  #wc-affirmation-app,
  .wc-app {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

#three-line-text {
  display: block;
  text-align: left;
  max-width: 40rem;
}

@media (min-width: 900px) {
  .wc-left > .wc-card,
  .wc-right > .wc-card {
    height: 100%;
  }
}

/* Make 3-line paragraph look nice inside the box */
#three-line-text {
  display: block;
  max-width: 40rem;
  text-align: left;   /* or center if you prefer */
}

/* Make left + right cards match height on desktop */
@media (min-width: 900px) {
  .wc-left > .wc-card,
  .wc-right > .wc-card {
    height: 100%;
  }
}
