/* ==========================================================================
   SBM Custom Order Form
   Floating-label / outlined Material-style inputs in the site's brand colors.
   ========================================================================== */

.sbm-cor-wrapper {
	--sbm-primary: #E11C3D;
	--sbm-primary-soft: rgba(225, 28, 61, 0.10);
	--sbm-dark: #050708;
	--sbm-border: #D8D9DC;
	--sbm-bg: #FFFFFF;
	--sbm-muted: #767A80;
	--sbm-radius: 12px;
	--sbm-ease: cubic-bezier(0.4, 0, 0.2, 1);

	font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--sbm-dark);
	max-width: 780px;
	margin: 0 auto;
	background: var(--sbm-bg);
}

.sbm-cor-wrapper *,
.sbm-cor-wrapper *::before,
.sbm-cor-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */
.sbm-cor-header { text-align: center; margin-bottom: 28px; }
.sbm-cor-header .sbm-logo { max-height: 56px; width: auto; margin-bottom: 14px; }
.sbm-cor-header h2 { font-size: 28px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
.sbm-cor-header p { color: var(--sbm-muted); margin: 0; font-size: 15px; }

/* ---------- Resume draft banner ---------- */
.sbm-resume-banner {
	display: flex; align-items: center; justify-content: center; gap: 14px;
	background: var(--sbm-primary-soft); border: 1px solid var(--sbm-primary);
	border-radius: var(--sbm-radius); padding: 12px 18px; margin-bottom: 20px;
	font-size: 14px; flex-wrap: wrap; text-align: center;
	animation: sbmFadeDown 0.3s var(--sbm-ease);
}
.sbm-link-btn {
	background: none; border: none; color: var(--sbm-primary); font-weight: 700;
	cursor: pointer; font-family: inherit; font-size: 14px; text-decoration: underline;
	padding: 4px 6px;
}
.sbm-link-btn.sbm-muted { color: var(--sbm-muted); }

/* ---------- Step navigation (pinned at top) ---------- */
.sbm-steps-nav { position: sticky; top: 0; z-index: 5; background: var(--sbm-bg); padding: 6px 0 18px; margin-bottom: 10px; }
.sbm-steps-track { height: 4px; background: #EEEFF1; border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.sbm-steps-fill { height: 100%; width: 14.28%; background: var(--sbm-primary); border-radius: 4px; transition: width 0.4s var(--sbm-ease); }
.sbm-steps-nav ol { list-style: none; display: flex; justify-content: space-between; margin: 0; padding: 0; gap: 4px; }
.sbm-step-pill { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; opacity: 0.45; transition: opacity 0.25s var(--sbm-ease); }
.sbm-step-pill.is-active,
.sbm-step-pill.is-complete { opacity: 1; }
.sbm-step-num {
	width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 700; background: #EEEFF1; color: var(--sbm-muted);
	transition: background 0.25s var(--sbm-ease), color 0.25s var(--sbm-ease), transform 0.25s var(--sbm-ease);
}
.sbm-step-pill.is-active .sbm-step-num { background: var(--sbm-primary); color: #fff; transform: scale(1.12); }
.sbm-step-pill.is-complete .sbm-step-num { background: var(--sbm-dark); color: #fff; }
.sbm-step-label { font-size: 11px; color: var(--sbm-muted); font-weight: 600; text-align: center; display: none; }
@media (min-width: 640px) { .sbm-step-label { display: block; } }

.sbm-prefill-note {
	background: var(--sbm-primary-soft); border-left: 3px solid var(--sbm-primary);
	padding: 10px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 18px;
}

/* ---------- Step panels ---------- */
.sbm-step-panel { display: none; animation: sbmStepIn 0.35s var(--sbm-ease); }
.sbm-step-panel.is-active { display: block; }
.sbm-step-panel h3 { font-size: 19px; font-weight: 700; margin: 0 0 18px; }

@keyframes sbmStepIn {
	from { opacity: 0; transform: translateX(14px); }
	to   { opacity: 1; transform: translateX(0); }
}
@keyframes sbmFadeDown {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.sbm-field-grid {
	display: grid; grid-template-columns: 1fr; gap: 22px 18px;
}
@media (min-width: 600px) {
	.sbm-field-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Floating label fields ---------- */
.sbm-field { position: relative; }

/* Fields placed directly in a step (Design Notes, Branding Placement, Packaging, the final
   message box) sit outside .sbm-field-grid, so they don't get the grid's row gap automatically.
   Without this they can overlap the field/grid immediately above them. */
.sbm-step-panel > .sbm-field { margin-top: 24px; }
.sbm-field input[type=text],
.sbm-field input[type=email],
.sbm-field input[type=tel],
.sbm-field input[type=url],
.sbm-field input[type=number],
.sbm-field input[type=date],
.sbm-field select,
.sbm-field textarea {
	width: 100%; padding: 15px 14px 13px; font-size: 15px; font-family: inherit;
	color: var(--sbm-dark); background: transparent;
	border: 1.5px solid var(--sbm-border); border-radius: var(--sbm-radius);
	transition: border-color 0.2s var(--sbm-ease), box-shadow 0.2s var(--sbm-ease);
	appearance: none; -webkit-appearance: none;
}
.sbm-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767A80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px;
}
.sbm-field textarea { resize: vertical; min-height: 84px; }
.sbm-field.has-icon input,
.sbm-field.has-icon select,
.sbm-field.has-icon textarea { padding-left: 42px; }

.sbm-field-icon {
	position: absolute; left: 13px; top: 15px; width: 18px; height: 18px; color: var(--sbm-muted);
	pointer-events: none; transition: color 0.2s var(--sbm-ease);
}
.sbm-field-icon svg { width: 100%; height: 100%; }

.sbm-field label {
	position: absolute; left: 14px; top: 14px; font-size: 15px; color: var(--sbm-muted);
	background: var(--sbm-bg); padding: 0 5px; pointer-events: none;
	transition: all 0.16s var(--sbm-ease); line-height: 1;
}
.sbm-field.has-icon label { left: 40px; }

.sbm-field.is-filled label,
.sbm-field:focus-within label {
	top: -8px; left: 12px; font-size: 11.5px; font-weight: 600; color: var(--sbm-primary);
}

.sbm-field input:focus,
.sbm-field select:focus,
.sbm-field textarea:focus {
	outline: none; border-color: var(--sbm-primary); box-shadow: 0 0 0 4px var(--sbm-primary-soft);
}
.sbm-field:focus-within .sbm-field-icon { color: var(--sbm-primary); }

.sbm-field.sbm-field-error input,
.sbm-field.sbm-field-error select,
.sbm-field.sbm-field-error textarea { border-color: var(--sbm-primary); }
.sbm-field-error-text { color: var(--sbm-primary); font-size: 12px; margin-top: 5px; display: block; }

/* ---------- File upload fields ---------- */
.sbm-file-field { margin: 18px 0; }
.sbm-file-label {
	display: flex; align-items: center; gap: 10px; border: 1.5px dashed var(--sbm-border);
	border-radius: var(--sbm-radius); padding: 16px; cursor: pointer; font-size: 14px; color: var(--sbm-muted);
	transition: border-color 0.2s var(--sbm-ease), background 0.2s var(--sbm-ease);
}
.sbm-file-label:hover { border-color: var(--sbm-primary); background: var(--sbm-primary-soft); }
.sbm-file-label svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--sbm-primary); }
.sbm-file-field input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sbm-file-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sbm-file-chip {
	display: flex; align-items: center; gap: 6px; background: #F5F5F6; border-radius: 20px;
	padding: 6px 12px; font-size: 12.5px; animation: sbmFadeDown 0.2s var(--sbm-ease);
}
.sbm-file-chip button { background: none; border: none; cursor: pointer; color: var(--sbm-muted); font-size: 14px; line-height: 1; }
.sbm-file-chip button:hover { color: var(--sbm-primary); }

/* ---------- Consent ---------- */
.sbm-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; margin: 18px 0; cursor: pointer; }
.sbm-consent input { margin-top: 3px; accent-color: var(--sbm-primary); width: 16px; height: 16px; }

/* ---------- Review summary ---------- */
.sbm-review-summary { margin-bottom: 20px; }
.sbm-review-group { margin-bottom: 16px; }
.sbm-review-group h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sbm-primary); margin: 0 0 8px; }
.sbm-review-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #F0F0F1; font-size: 14px; }
.sbm-review-row span:first-child { color: var(--sbm-muted); }
.sbm-review-row span:last-child { font-weight: 600; text-align: right; }

/* ---------- Buttons ---------- */
.sbm-step-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }
.sbm-btn {
	font-family: inherit; font-size: 14.5px; font-weight: 700; padding: 13px 26px; border-radius: 999px;
	border: none; cursor: pointer; transition: transform 0.15s var(--sbm-ease), box-shadow 0.15s var(--sbm-ease), background 0.15s var(--sbm-ease);
}
.sbm-btn:active { transform: scale(0.97); }
.sbm-btn-primary { background: var(--sbm-primary); color: #fff; box-shadow: 0 6px 16px rgba(225,28,61,0.28); }
.sbm-btn-primary:hover { box-shadow: 0 8px 20px rgba(225,28,61,0.36); }
.sbm-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.sbm-btn-ghost { background: transparent; color: var(--sbm-dark); border: 1.5px solid var(--sbm-border); }
.sbm-btn-ghost:hover { border-color: var(--sbm-dark); }

/* ---------- Honeypot (hidden from real users) ---------- */
.sbm-honeypot { position: absolute; left: -9999px; top: -9999px; opacity: 0; }

/* ---------- Error / success states ---------- */
.sbm-error-msg { color: var(--sbm-primary); font-size: 13.5px; margin: 4px 0 0; }
.sbm-success-screen { display: none; text-align: center; padding: 50px 20px; animation: sbmFadeDown 0.4s var(--sbm-ease); }
.sbm-success-screen.is-active { display: block; }
.sbm-success-icon {
	width: 60px; height: 60px; border-radius: 50%; background: var(--sbm-primary); color: #fff;
	display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 18px;
	animation: sbmPop 0.4s var(--sbm-ease);
}
@keyframes sbmPop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sbm-success-screen h3 { font-size: 22px; margin: 0 0 8px; }
.sbm-success-screen p { color: var(--sbm-muted); margin: 4px 0; }
.sbm-success-ref strong { color: var(--sbm-dark); }

/* ---------- "Request a Custom Quote" button on WooCommerce product pages ---------- */
.sbm-quote-button-wrap {
	display: block !important;
	clear: both !important;
	float: none !important;
	width: 100%;
	margin: 16px 0 8px !important;
}
.sbm-quote-button {
	display: inline-flex; align-items: center; gap: 8px;
	background: #E11C3D; color: #fff !important; font-family: 'Barlow', sans-serif; font-weight: 700;
	font-size: 14.5px; padding: 12px 24px; border-radius: 999px; text-decoration: none;
	border: none; cursor: pointer;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
	box-shadow: 0 6px 16px rgba(225,28,61,0.28);
}
.sbm-quote-button:hover { box-shadow: 0 8px 20px rgba(225,28,61,0.36); color: #fff; transform: translateY(-1px); }

/* ---------- Popup modal (product page) ---------- */
.sbm-modal-overlay {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(5, 7, 8, 0.6);
	display: flex; align-items: flex-start; justify-content: center;
	padding: 40px 16px; overflow-y: auto;
	opacity: 0; visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sbm-modal-overlay.is-open { opacity: 1; visibility: visible; }
.sbm-modal-dialog {
	background: #fff; border-radius: 18px; max-width: 820px; width: 100%;
	position: relative; margin: auto; padding: 34px 28px 28px;
	box-shadow: 0 24px 64px rgba(0,0,0,0.28);
	transform: translateY(24px) scale(0.98);
	transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sbm-modal-overlay.is-open .sbm-modal-dialog { transform: translateY(0) scale(1); }
.sbm-modal-close {
	position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
	border: none; background: #F5F5F6; font-size: 20px; line-height: 1; cursor: pointer; color: #050708;
	display: flex; align-items: center; justify-content: center;
	transition: background 0.15s ease;
}
.sbm-modal-close:hover { background: #EEEFF1; }
.sbm-modal-loading {
	text-align: center; padding: 70px 20px; color: #767A80;
	font-family: 'Barlow', sans-serif; font-size: 15px;
}
body.sbm-modal-open { overflow: hidden; }
@media (max-width: 600px) {
	.sbm-modal-overlay { padding: 0; align-items: stretch; }
	.sbm-modal-dialog { border-radius: 0; max-width: none; min-height: 100vh; padding: 26px 16px; margin: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.sbm-cor-wrapper * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	.sbm-cor-header h2 { font-size: 22px; }
	.sbm-step-actions { flex-direction: row; gap: 10px; }
	.sbm-btn { flex: 1; padding: 13px 14px; }
}
