/**
 * BlueCube Configurator Modal — default styles.
 * Brand defaults (Discipline by Design): deep navy / cream / clean type.
 * Heather can override colors via Elementor button controls; deeper changes
 * via this file (we iterate based on her aesthetic feedback).
 */

/* --------- Theme-bleed reset ---------
 * The site theme defines a global button:hover color (pink/magenta variant)
 * that bled through onto our color swatches and size pills, since our rules
 * only set border-color on hover. Reset bg + color for any button inside the
 * configurator surfaces — both the legacy modal panel and the new shortcode
 * mount used inside Elementor popups. */
.bc-cfg-modal-panel button,
.bc-cfg-form button {
	background-color: transparent;
	color: inherit;
}
.bc-cfg-modal-panel button:hover,
.bc-cfg-modal-panel button:focus,
.bc-cfg-modal-panel button:active,
.bc-cfg-form button:hover,
.bc-cfg-form button:focus,
.bc-cfg-form button:active {
	background-color: transparent;
	color: inherit;
}

/* --------- Trigger button --------- */
.bc-cfg-trigger-wrap { width: 100%; }
.bc-cfg-trigger {
	display: inline-block;
	border: 0;
	background-color: #4a6e83;
	color: #fff;
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	padding: 17px 23px;
	border-radius: 3px;
	box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.5);
	cursor: pointer;
	transition: background-color 0.18s ease, transform 0.12s ease;
}
.bc-cfg-trigger:hover,
.bc-cfg-trigger:focus { background-color: #1a3a4f; color: #fff; }
.bc-cfg-trigger:active { transform: translateY(1px); }
.bc-cfg-trigger:focus-visible { outline: 2px solid #c8a96a; outline-offset: 3px; }

/* --------- Modal shell --------- */
.bc-cfg-modal {
	position: fixed; inset: 0;
	z-index: 99999;
	display: none;
	align-items: flex-start; justify-content: center;
	overflow-y: auto;
	padding: 5vh 16px 5vh;
}
.bc-cfg-modal.is-open { display: flex; }
.bc-cfg-body-locked { overflow: hidden; }

.bc-cfg-modal-backdrop {
	position: fixed; inset: 0;
	background: rgba(14, 35, 48, 0.78);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.bc-cfg-modal-panel {
	position: relative;
	width: 100%;
	max-width: 640px;
	background: #fff;
	color: #0e2330;
	border-radius: 6px;
	box-shadow: 0 30px 80px -20px rgba(0,0,0,0.45);
	padding: 36px 36px 28px;
	font-family: inherit;
}

.bc-cfg-modal-close {
	position: absolute; top: 14px; right: 16px;
	width: 36px; height: 36px;
	background: transparent; border: 0;
	font-size: 28px; line-height: 1;
	color: #0e2330;
	cursor: pointer;
	border-radius: 4px;
}
.bc-cfg-modal-close:hover { background: #f3f4f6; }

.bc-cfg-modal-heading {
	font: 600 24px/1.25 inherit;
	letter-spacing: -0.01em;
	margin: 0 0 20px;
	color: #0e2330;
}

.bc-cfg-loading {
	padding: 40px 0;
	text-align: center;
	color: #6b7280;
	font-size: 14px;
}

/* --------- Sections --------- */
.bc-cfg-section { padding: 16px 0; border-top: 1px solid #e5e7eb; }
.bc-cfg-section:first-of-type { border-top: 0; padding-top: 0; }
.bc-cfg-section-h {
	font: 600 12px/1.4 inherit;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #6b7280;
	margin: 0 0 12px;
}

/* --------- Color swatches --------- */
.bc-cfg-swatch-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
	gap: 10px;
}
.bc-cfg-swatch {
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	padding: 10px 6px;
	background-color: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
	font: 500 12px/1.2 inherit;
	color: #0e2330;
}
.bc-cfg-swatch:hover,
.bc-cfg-swatch:focus {
	background-color: #fff;
	color: #0e2330;
	border-color: #0e2330;
	outline: none;
}
.bc-cfg-swatch:focus-visible { outline: 2px solid #c8a96a; outline-offset: 2px; }
.bc-cfg-swatch.is-selected {
	background-color: #fff;
	color: #0e2330;
	border-color: #0e2330;
	box-shadow: inset 0 0 0 1px #0e2330;
}
.bc-cfg-swatch-chip {
	width: 36px; height: 36px;
	border-radius: 50%;
	border: 1px solid #d1d5db;
}
.bc-cfg-swatch--black .bc-cfg-swatch-chip  { background: #1a1a1a; }
.bc-cfg-swatch--white .bc-cfg-swatch-chip  { background: #f5f5f5; }
.bc-cfg-swatch--grey .bc-cfg-swatch-chip   { background: #8a8a8a; }
.bc-cfg-swatch--beige .bc-cfg-swatch-chip  { background: #d4c5a0; }
.bc-cfg-swatch--blue .bc-cfg-swatch-chip   { background: #21AFEB; }
.bc-cfg-swatch--red .bc-cfg-swatch-chip    { background: #B91C1C; }
.bc-cfg-swatch--uncladded .bc-cfg-swatch-chip {
	background: linear-gradient(135deg, #b08e5a 0%, #8d6f44 100%);
}
.bc-cfg-swatch--custom .bc-cfg-swatch-chip {
	background: conic-gradient(from 0deg, #ef4444, #f59e0b, #eab308, #22c55e, #3b82f6, #8b5cf6, #ef4444);
}

.bc-cfg-custom-color { margin-top: 14px; }
.bc-cfg-custom-color label {
	display: block; margin-bottom: 6px;
	font: 500 13px/1.3 inherit;
	color: #374151;
}

/* --------- Size pills --------- */
.bc-cfg-pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-cfg-pill {
	background-color: #fff;
	border: 1px solid #e5e7eb;
	color: #0e2330;
	padding: 12px 18px;
	border-radius: 30px;
	cursor: pointer;
	font: 500 13px/1.2 inherit;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.bc-cfg-pill:hover,
.bc-cfg-pill:focus {
	background-color: #fff;
	color: #0e2330;
	border-color: #0e2330;
	outline: none;
}
.bc-cfg-pill:focus-visible { outline: 2px solid #c8a96a; outline-offset: 2px; }
.bc-cfg-pill.is-selected,
.bc-cfg-pill.is-selected:hover,
.bc-cfg-pill.is-selected:focus {
	background-color: #0e2330;
	color: #fff;
	border-color: #0e2330;
}

/* --------- Add-ons --------- */
.bc-cfg-addon-row {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	margin-bottom: 10px;
	overflow: hidden;
}
.bc-cfg-addon-row.is-on { border-color: #0e2330; }
.bc-cfg-addon-row.is-disabled { opacity: 0.5; pointer-events: none; }

.bc-cfg-addon-header {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 16px;
	cursor: pointer;
	font: 500 14px/1.3 inherit;
	color: #0e2330;
}
.bc-cfg-addon-toggle {
	width: 18px; height: 18px;
	cursor: pointer;
	accent-color: #0e2330;
}
.bc-cfg-addon-name { flex: 1; }
.bc-cfg-addon-price { color: #6b7280; font-weight: 600; font-variant-numeric: tabular-nums; }

.bc-cfg-addon-subpicks {
	padding: 0 16px 16px 46px;
	display: none;
	gap: 12px;
	flex-direction: column;
	background: #fafafa;
}
.bc-cfg-addon-row.is-on .bc-cfg-addon-subpicks { display: flex; }
.bc-cfg-subpick label {
	display: block;
	font: 500 12px/1.4 inherit;
	color: #6b7280;
	margin-bottom: 4px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* --------- Inputs --------- */
.bc-cfg-input,
.bc-cfg-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font: 400 14px/1.4 inherit;
	color: #0e2330;
	background: #fff;
}
.bc-cfg-input:focus,
.bc-cfg-select:focus {
	outline: 2px solid #c8a96a;
	outline-offset: 0;
	border-color: #c8a96a;
}

/* --------- Footer --------- */
.bc-cfg-modal-footer {
	border-top: 1px solid #e5e7eb;
	padding: 20px 0 0;
	margin-top: 18px;
	display: flex; flex-direction: column; gap: 14px;
}
.bc-cfg-summary {
	display: flex; align-items: baseline; justify-content: space-between;
}
.bc-cfg-summary-label {
	font: 500 12px/1.2 inherit;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #6b7280;
}
.bc-cfg-summary-total {
	font: 700 26px/1.1 inherit;
	color: #0e2330;
	font-variant-numeric: tabular-nums;
}

.bc-cfg-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 10px 14px;
	border-radius: 4px;
	font: 500 13px/1.4 inherit;
}

/* Inline form mount via [bluecube_configurator] shortcode — same inner layout
 * as the modal body, just without modal chrome. Heather designs surrounding
 * containers/popup chrome in Elementor. */
.bc-cfg-form-mount {
	width: 100%;
}
.bc-cfg-form-mount > .bc-cfg-loading {
	padding: 24px 0;
	text-align: center;
	color: #6b7280;
	font: 500 14px/1.4 inherit;
}
.bc-cfg-form-mount > .bc-cfg-loading.bc-cfg-error-msg {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 14px 16px;
	border-radius: 4px;
	text-align: left;
}

.bc-cfg-submit {
	width: 100%;
	background-color: #0e2330;
	color: #fff;
	border: 0;
	padding: 16px 24px;
	border-radius: 4px;
	cursor: pointer;
	font: 600 14px/1.2 inherit;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transition: background-color 0.18s ease;
}
.bc-cfg-submit:hover:not(:disabled),
.bc-cfg-submit:focus:not(:disabled) {
	background-color: #1a3a4f;
	color: #fff;
}
.bc-cfg-submit:disabled { opacity: 0.6; cursor: not-allowed; }

@media ( max-width: 640px ) {
	.bc-cfg-modal-panel { padding: 28px 20px 22px; }
	.bc-cfg-modal-heading { font-size: 20px; }
	.bc-cfg-summary-total { font-size: 22px; }
}

/* ----------------------------------------------------------------------
 * Shortcode-mount layout (used inside Elementor popups).
 *
 * The Elementor popup provides the modal shell (background, close button,
 * padding, animation). [bluecube_configurator_form] renders just the form
 * interior into a .bc-cfg-form container. Reuse the same section/swatch/pill
 * rules above; this block only adds layout for the standalone footer block.
 * ---------------------------------------------------------------------- */
.bc-cfg-form { color: #0e2330; font-family: inherit; }
.bc-cfg-form .bc-cfg-loading { padding: 40px 0; text-align: center; color: #6b7280; font-size: 14px; }
.bc-cfg-form-footer {
	border-top: 1px solid #e5e7eb;
	padding: 20px 0 0;
	margin-top: 18px;
	display: flex; flex-direction: column; gap: 14px;
}
