/* ============================================================
   AI Business Card Generator — Frontend Styles
   Scoped entirely under .abcg-wrap to prevent theme conflicts.
   ============================================================ */

.abcg-wrap {
	--abcg-bg:         #0f172a;
	--abcg-gold:       linear-gradient(135deg, #d4af37 0%, #f9e29c 50%, #b8860b 100%);
	--abcg-gold-solid: #d4af37;
	--abcg-glass:      rgba(255, 255, 255, 0.06);
	--abcg-border:     rgba(255, 255, 255, 0.13);
	--abcg-muted:      #cbd5e1;

	box-sizing: border-box;
	background: radial-gradient(circle at top, #1e293b 0%, #0f172a 52%, #020617 100%);
	color: #ffffff;
	padding: 40px 24px 48px;
	max-width: 540px;
	margin-left: auto;
	margin-right: auto;
	border-radius: 28px;
	font-family: Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

.abcg-wrap *,
.abcg-wrap *::before,
.abcg-wrap *::after {
	box-sizing: border-box;
}

/* ── Page header ─────────────────────────────────────────── */
.abcg-header {
	text-align: center;
	margin-bottom: 28px;
}

.abcg-header h1 {
	margin: 0 0 8px;
	font-size: 26px;
	font-weight: 900;
	letter-spacing: 0.5px;
	background: var(--abcg-gold);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.abcg-header p {
	margin: 0;
	color: #94a3b8;
	font-size: 14px;
	line-height: 1.5;
}

/* ── Scene / centering ────────────────────────────────────── */
.abcg-scene {
	display: flex;
	flex-direction: column;
	align-items: center;
	perspective: 1000px;
}

/* ── 3D form card ─────────────────────────────────────────── */
.abcg-card-3d {
	width: 100%;
	max-width: 420px;
	min-height: 260px;
	background: rgba(30, 41, 59, 0.88);
	border: 1px solid var(--abcg-border);
	border-radius: 24px;
	padding: 26px 24px 22px;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.55);
	transform: rotateX(5deg);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.abcg-card-3d:hover {
	transform: rotateX(0deg) translateY(-4px);
	box-shadow: 0 32px 60px rgba(0, 0, 0, 0.6);
}

/* ── Step counter + title ─────────────────────────────────── */
.abcg-step-counter {
	text-align: center;
	color: #94a3b8;
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.abcg-step-title {
	margin: 0 0 20px;
	text-align: center;
	font-size: 20px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 1px;
	background: var(--abcg-gold);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* ── Steps visibility ─────────────────────────────────────── */
.abcg-step          { display: none; }
.abcg-step.active   { display: block; }

/* ── Form elements ────────────────────────────────────────── */
.abcg-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	font-weight: 800;
	color: #e2e8f0;
	margin-bottom: 8px;
}

.abcg-optional {
	font-size: 11px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	opacity: 0.75;
}

.abcg-input,
.abcg-textarea,
.abcg-file-input {
	width: 100%;
	background: rgba(0, 0, 0, 0.26);
	border: 1px solid var(--abcg-border);
	border-radius: 13px;
	padding: 12px 14px;
	color: #ffffff;
	font-size: 14px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s;
}

.abcg-input:focus,
.abcg-textarea:focus {
	border-color: var(--abcg-gold-solid);
}

.abcg-input::placeholder,
.abcg-textarea::placeholder {
	color: #475569;
}

.abcg-textarea {
	min-height: 90px;
	resize: vertical;
}

.abcg-file-input {
	padding: 10px;
	cursor: pointer;
	color: var(--abcg-muted);
}

.abcg-file-input::-webkit-file-upload-button {
	background: var(--abcg-gold-solid);
	color: #453200;
	border: none;
	border-radius: 8px;
	padding: 6px 12px;
	font-weight: 700;
	cursor: pointer;
	font-size: 12px;
}

.abcg-help {
	margin: 10px 0 0;
	color: #94a3b8;
	font-size: 12px;
	line-height: 1.5;
}

/* ── Nav buttons ──────────────────────────────────────────── */
.abcg-nav {
	display: grid;
	gap: 10px;
	margin-top: 20px;
}

.abcg-nav-single,
.abcg-nav.single   { grid-template-columns: 1fr; }
.abcg-nav.double   { grid-template-columns: 1fr 1fr; }

.abcg-btn-next,
.abcg-btn-generate {
	background: var(--abcg-gold);
	color: #453200;
	border: none;
	border-radius: 14px;
	padding: 14px;
	font-weight: 900;
	font-size: 13px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(212, 175, 55, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	font-family: inherit;
}

.abcg-btn-next:hover,
.abcg-btn-generate:hover {
	transform: scale(1.03);
	box-shadow: 0 12px 28px rgba(212, 175, 55, 0.35);
}

.abcg-btn-back {
	background: var(--abcg-glass);
	border: 1px solid var(--abcg-border);
	color: #ffffff;
	border-radius: 14px;
	padding: 14px;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s;
	font-family: inherit;
}

.abcg-btn-back:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* ── Loader ───────────────────────────────────────────────── */
.abcg-loader {
	display: none;
	margin: 20px auto 0;
	width: 38px;
	height: 38px;
	border: 4px solid rgba(255, 255, 255, 0.08);
	border-left-color: var(--abcg-gold-solid);
	border-radius: 50%;
	animation: abcg-spin 0.9s linear infinite;
}

.abcg-loader-text {
	display: none;
	text-align: center;
	margin: 10px auto 0;
	max-width: 320px;
	font-size: 12px;
	color: #94a3b8;
	letter-spacing: .8px;
	line-height: 1.6;
}

.abcg-loader-text small {
	font-size: 10px;
	opacity: .7;
}

@keyframes abcg-spin { to { transform: rotate(360deg); } }

/* ── Error ────────────────────────────────────────────────── */
.abcg-error {
	display: none;
	margin-top: 14px;
	padding: 14px 18px;
	background: #fee2e2;
	border: 1px solid #ef4444;
	border-radius: 10px;
	color: #991b1b;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

/* ── Result area ──────────────────────────────────────────── */
.abcg-result {
	width: 100%;
	max-width: 420px;
	text-align: center;
	animation: abcg-fade-in 0.55s ease forwards;
}

@keyframes abcg-fade-in {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

.abcg-result-label {
	color: #475569;
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin: 0 0 10px;
}

/* ══════════════════════════════════════════════════════════
   HTML BUSINESS CARD — DALL-E bg + CSS text overlay
   ══════════════════════════════════════════════════════════ */

.abcg-hcard {
	position: relative;
	width: 100%;
	max-width: 560px;
	aspect-ratio: 3.5 / 2;
	border-radius: 14px;
	overflow: hidden;
	margin: 0 auto;
	box-shadow:
		0 28px 70px rgba(0, 0, 0, 0.75),
		0 0 0 1px rgba(255, 255, 255, 0.08);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.abcg-hcard:hover {
	transform: translateY(-6px) scale(1.012);
	box-shadow:
		0 40px 90px rgba(0, 0, 0, 0.80),
		0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* ── Background image layer ───────────────────────────────── */
.abcg-hcard-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-color: #0f172a;
	transition: opacity 0.6s ease;
}

/* ── Dark gradient overlay for text readability ───────────── */
.abcg-hcard-ov {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(0, 0, 0, 0.75) 0%,
		rgba(0, 0, 0, 0.28) 55%,
		rgba(0, 0, 0, 0.60) 100%
	);
}

/* ── Card content ─────────────────────────────────────────── */
.abcg-hcard-body {
	position: relative;
	z-index: 2;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 6% 7%;
	color: #ffffff;
	font-family: Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

/* ── Top: logo + company + tagline ───────────────────────── */
.abcg-hcard-top {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.abcg-hcard-logo {
	width: 40px;
	height: 40px;
	object-fit: contain;
	border-radius: 8px;
	margin-bottom: 8px;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.abcg-hcard-company {
	font-size: clamp(14px, 3.4vw, 22px);
	font-weight: 900;
	letter-spacing: 2px;
	text-transform: uppercase;
	line-height: 1.1;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.abcg-hcard-tagline {
	font-size: clamp(8px, 1.6vw, 10px);
	opacity: 0.65;
	letter-spacing: 0.8px;
	font-style: italic;
	margin-top: 2px;
}

/* ── Bottom: name + title + contacts ─────────────────────── */
.abcg-hcard-bot {
	text-align: right;
}

.abcg-hcard-name {
	font-size: clamp(12px, 2.8vw, 18px);
	font-weight: 700;
	letter-spacing: 0.8px;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.abcg-hcard-jobtitle {
	font-size: clamp(8px, 1.7vw, 11px);
	opacity: 0.85;
	margin-top: 2px;
	margin-bottom: 6px;
	letter-spacing: 0.5px;
	font-weight: 600;
}

.abcg-hcard-contacts {
	font-size: clamp(7px, 1.5vw, 10px);
	opacity: 0.70;
	line-height: 1.75;
}

/* ── Gold accent bar at bottom ────────────────────────────── */
.abcg-hcard-accent {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--abcg-gold);
}

/* ── Back card — centred layout ───────────────────────────── */
.abcg-hcard-body--back {
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 6px;
}

.abcg-hcard-logo--back {
	width: 52px;
	height: 52px;
	margin-bottom: 6px;
}

.abcg-hcard-company--back {
	font-size: clamp(15px, 3.6vw, 24px);
	letter-spacing: 3px;
}

.abcg-hcard-tagline--back {
	font-size: clamp(9px, 1.8vw, 11px);
}

.abcg-hcard-website--back {
	font-size: clamp(8px, 1.6vw, 11px);
	opacity: 0.55;
	margin-top: 8px;
	letter-spacing: 0.5px;
}

/* ── Action buttons ───────────────────────────────────────── */
.abcg-actions {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 22px;
}

.abcg-action-btn {
	padding: 11px 22px;
	border-radius: 10px;
	border: none;
	background: #1e293b;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	font-family: inherit;
}

.abcg-action-btn:hover {
	background: #334155;
	transform: translateY(-2px);
}

/* ── Print styles ─────────────────────────────────────────── */
@media print {
	body > *:not(.abcg-wrap)  { display: none !important; }
	.abcg-wrap                { background: none !important; padding: 0 !important; }
	.abcg-card-3d, .abcg-actions,
	.abcg-result-label, #abcg-restart { display: none !important; }
	.abcg-result              { display: block !important; }
	.abcg-hcard {
		width: 3.5in;
		height: 2in;
		aspect-ratio: unset;
		page-break-after: always;
		box-shadow: none;
		border: 1px solid #ccc;
		margin: 0.25in auto;
	}
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
	.abcg-card-3d { transform: none; }
	.abcg-hcard   { border-radius: 10px; }
}


/* ── Action buttons ───────────────────────────────────────── */
.abcg-actions {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 18px;
}

.abcg-action-btn {
	padding: 10px 20px;
	border-radius: 10px;
	border: none;
	background: #1e293b;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	font-family: inherit;
}

.abcg-action-btn:hover {
	background: #334155;
	transform: translateY(-1px);
}

/* ── Full-bleed layout overrides ─────────────────────────── */
.abcg-biz-card[data-layout="full_bleed"] {
	position: relative;
}

.abcg-biz-card[data-layout="full_bleed"] .abcg-front-right {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	grid-column: unset;
	z-index: 1;
}

.abcg-biz-card[data-layout="full_bleed"] .abcg-front-left {
	background: transparent !important;
	background: linear-gradient(to right,
		rgba(0,0,0,0.80) 0%,
		rgba(0,0,0,0.55) 65%,
		rgba(0,0,0,0.05) 100%) !important;
	z-index: 2;
}

.abcg-biz-card[data-layout="full_bleed"] .abcg-contact-bar {
	z-index: 3;
	background: rgba(0,0,0,0.65) !important;
}

/* ── Print styles ─────────────────────────────────────────── */
@media print {
	body > *:not(.abcg-wrap) { display: none !important; }
	.abcg-wrap { background: none !important; padding: 0 !important; }
	.abcg-card-3d,
	.abcg-actions,
	.abcg-result-label,
	#abcg-restart { display: none !important; }
	.abcg-result { display: block !important; }
	.abcg-biz-card {
		width: 3.5in;
		height: 2in;
		page-break-after: always;
		box-shadow: none;
		border: 1px solid #ccc;
		margin: 0.25in auto;
	}
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
	.abcg-card-3d { transform: none; }
	.abcg-biz-card { width: 100%; height: auto; min-height: 175px; }
}
