/* ==========================================================================
   Certified Bling — Create Custom / AI Design Studio intake (Phase 11)

   Page-specific patterns only — hero/paths/how-it-works reuse existing
   global components (sections.css, collection-card.css) with zero new CSS.
   This file is the studio wizard itself: one question per screen, large
   tappable option cards, a thin progress bar, form fields in the
   system's existing dark-surface/hairline/gold-focus convention (same
   one footer.css's newsletter field and the header search field use —
   no new input style invented here). Enqueued only on this page template
   (functions.php).
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------
   "Create Something That Doesn't Exist Yet." is seven words — more than
   twice the length of the homepage's "Jewelry Made Your Way." .cb-h-hero
   is sized (--cb-display, up to 9rem) for that short a phrase; at full
   size here it wrapped to four-plus lines and overflowed the viewport.
   Scoped down to a size this specific headline actually fits in two
   lines at. Found live during this page's own visual QA pass. */
.cb-cc__hero .cb-h-hero { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem); }
.cb-cc__hero-copy { max-width: 32rem; }

/* ---- Two paths ----------------------------------------------------------- */
.cb-cc__paths-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--cb-space-m);
}
@media (max-width: 767px) { .cb-cc__paths-grid { grid-template-columns: 1fr; gap: var(--cb-space-m); } }

/* ---- Studio wizard shell -------------------------------------------------
   Deliberately narrow (not full .cb-container width) — a conversation
   reads as one column, never a wide dashboard, on desktop or mobile. */
.cb-cc__studio-inner { max-width: 38rem; margin-inline: auto; }

.cb-cc__studio-progress { margin-bottom: var(--cb-space-l); }
.cb-cc__studio-progress-track { height: 2px; background: var(--cb-line-dark); border-radius: 999px; overflow: hidden; }
.cb-cc__studio-progress-fill { height: 100%; width: 0%; background: var(--cb-gold); transition: width var(--cb-transition-slow); }
.cb-cc__studio-progress [data-cc-progress-label] { display: block; margin-top: 0.5rem; color: var(--cb-mute); }
@media (prefers-reduced-motion: reduce) { .cb-cc__studio-progress-fill { transition: none; } }

.cb-cc__studio-kicker { display: block; margin-bottom: 0.6rem; }
/* A conversational prompt ("What range would you like us to design
   around?") runs much longer than a section's one-word/short-phrase
   headline elsewhere on the site — at full .cb-h-section size several of
   these wrapped to 4 lines and pushed the options off-screen. One
   controlled size for every screen's question, short or long. Found
   live during this page's own visual QA pass (same class of issue as
   the hero fix above). */
.cb-cc__screen h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); }
.cb-cc__screen { display: none; }
.cb-cc__screen.is-active { display: block; animation: cb-cc-screen-in 260ms ease both; }
@keyframes cb-cc-screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .cb-cc__screen.is-active { animation: none; } }
.cb-cc__screen h2 { margin-bottom: 0.5rem; }
.cb-cc__screen > p.cb-body { margin-bottom: var(--cb-space-m); max-width: 46ch; }

/* ---- Option cards — the primary interaction: large, tappable, one
   thing to decide at a time. Grid variant for jewelry type (more
   options, equal weight); default flex-wrap for short material lists;
   list variant for budget (longer labels read better stacked). ---- */
.cb-cc__options { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: var(--cb-space-m); }
.cb-cc__options--grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.cb-cc__options--list { flex-direction: column; }
@media (max-width: 600px) { .cb-cc__options--grid { grid-template-columns: repeat(2, 1fr); } }

.cb-cc__option {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: var(--cb-touch-min);
	padding: 1rem 1.25rem;
	background: transparent;
	border: 1px solid var(--cb-line-dark);
	border-radius: 2px;
	color: var(--cb-white);
	font-family: var(--cb-font-body);
	font-size: var(--cb-text-sm);
	font-weight: 500;
	cursor: pointer;
	transition: border-color var(--cb-transition), background var(--cb-transition);
}
.cb-cc__options--list .cb-cc__option { justify-content: flex-start; text-align: left; }
.cb-cc__option:hover { border-color: var(--cb-mute); }
.cb-cc__option.is-selected { border-color: var(--cb-gold); background: var(--cb-gold-soft); color: var(--cb-gold-ink); }
@media (prefers-reduced-motion: reduce) { .cb-cc__option { transition: none; } }

/* ---- Text inputs — same dark-surface/hairline/gold-focus convention as
   the footer newsletter field and header search field; no new look. ---- */
.cb-cc__textarea,
.cb-cc__input {
	display: block;
	width: 100%;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--cb-line-soft);
	color: var(--cb-white);
	font-family: var(--cb-font-body);
	font-size: var(--cb-text-lg);
	line-height: var(--cb-leading-body);
	padding-block: 0.75rem;
	resize: vertical;
}
.cb-cc__input { font-size: var(--cb-text-base); }
.cb-cc__textarea::placeholder,
.cb-cc__input::placeholder { color: var(--cb-mute); }
.cb-cc__textarea:focus,
.cb-cc__input:focus { outline: none; border-color: var(--cb-gold); }

.cb-cc__fields { display: flex; flex-direction: column; gap: var(--cb-space-m); }
.cb-cc__budget-amount { margin-top: var(--cb-space-m); max-width: 16rem; }

.cb-cc__error { color: var(--cb-error-on-dark); font-size: var(--cb-text-sm); margin-top: var(--cb-space-s); }

/* ---- Upload dropzone ----------------------------------------------------- */
.cb-cc__dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	text-align: center;
	padding: var(--cb-space-l);
	border: 1px dashed var(--cb-line-dark);
	border-radius: 2px;
	cursor: pointer;
	transition: border-color var(--cb-transition), background var(--cb-transition);
}
.cb-cc__dropzone:hover,
.cb-cc__dropzone.is-dragover { border-color: var(--cb-gold); background: color-mix(in srgb, var(--cb-gold) 6%, transparent); }
.cb-cc__dropzone-label {
	font-family: var(--cb-font-body);
	font-size: var(--cb-text-xs);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--cb-white);
}
@media (prefers-reduced-motion: reduce) { .cb-cc__dropzone { transition: none; } }

.cb-cc__file-list { list-style: none; margin: var(--cb-space-s) 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.cb-cc__file-list li {
	display: flex; align-items: center; justify-content: space-between; gap: var(--cb-space-s);
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--cb-line-dark);
	font-size: var(--cb-text-sm);
}
.cb-cc__file-remove { color: var(--cb-mute); font-size: var(--cb-text-xs); text-transform: uppercase; letter-spacing: 0.08em; background: none; border: 0; cursor: pointer; }
.cb-cc__file-remove:hover { color: var(--cb-error-on-dark); }

/* ---- Size detail fields (JS-populated per jewelry type) ------------------ */
.cb-cc__size-fields { display: flex; flex-direction: column; gap: var(--cb-space-m); margin-top: var(--cb-space-m); }
.cb-cc__size-fields label { display: block; margin-bottom: 0.3rem; color: var(--cb-mute); font-size: var(--cb-text-sm); }

/* ---- Review -------------------------------------------------------------- */
.cb-cc__review { margin: 0; }
.cb-cc__review div { display: flex; justify-content: space-between; gap: var(--cb-space-m); padding: 0.6rem 0; border-top: 1px solid var(--cb-line-dark); }
.cb-cc__review dt { color: var(--cb-mute); }
.cb-cc__review dd { margin: 0; text-align: right; max-width: 60%; }

/* ---- Success --------------------------------------------------------------- */
.cb-cc__screen--success { text-align: center; }
.cb-cc__screen--success .cb-cc__studio-kicker { color: var(--cb-gold); }
.cb-cc__project-code {
	margin: var(--cb-space-m) 0;
	padding: var(--cb-space-s) var(--cb-space-m);
	border: 1px solid var(--cb-line-dark);
	display: inline-flex;
	flex-direction: column;
	gap: 0.2rem;
}
.cb-cc__project-code strong { font-family: var(--cb-font-mono); font-size: var(--cb-text-xl); color: var(--cb-gold); letter-spacing: 0.04em; }
.cb-cc__success-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--cb-space-s); margin-top: var(--cb-space-m); }

/* ---- Nav row --------------------------------------------------------------- */
.cb-cc__nav { display: flex; align-items: center; justify-content: space-between; gap: var(--cb-space-m); margin-top: var(--cb-space-xl); }
.cb-cc__nav [data-cc-continue],
.cb-cc__nav [data-cc-submit] { margin-left: auto; }

.cb-cc__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- How Custom Works ------------------------------------------------------ */
.cb-cc__how-mto { margin-top: var(--cb-space-l); color: var(--cb-gold-ink); }

/* ---- Mobile: full-bleed studio, bottom-anchored nav for easy thumb reach --- */
@media (max-width: 600px) {
	.cb-cc__studio-inner { max-width: none; }
	.cb-cc__nav { position: sticky; bottom: 0; background: var(--cb-black); padding-block: var(--cb-space-s); margin-top: var(--cb-space-l); border-top: 1px solid var(--cb-line-dark); }
}
