/* ============================================================
   Booklet Price Calculator — v1.1.0
   ============================================================ */

#bpc-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	color: #1a1a2e;
	max-width: 980px;
	margin: 0 auto;
}

/* ── Layout ─────────────────────────────────────────────────── */
.bpc-row {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}
.bpc-options {
	flex: 1 1 0;
	min-width: 0;
}
.bpc-sidebar {
	width: 270px;
	flex-shrink: 0;
	position: sticky;
	top: 24px;
}

/* ── Fields ─────────────────────────────────────────────────── */
.bpc-field {
	margin-bottom: 22px;
}
.bpc-field-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 8px;
}

/* ── Option Cards ───────────────────────────────────────────── */
.bpc-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.bpc-card {
	flex: 1 1 130px;
	padding: 11px 14px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	background: #fff;
	transition: border-color .14s, background .14s, box-shadow .14s;
	line-height: 1.4;
	user-select: none;
}
.bpc-card:hover {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.bpc-card.active {
	border-color: #2563eb;
	background: #eff6ff;
	box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.bpc-card-title {
	font-weight: 600;
	font-size: 14px;
	color: #1e293b;
}
.bpc-card.active .bpc-card-title { color: #1d4ed8; }
.bpc-card-sub {
	font-size: 12px;
	color: #64748b;
	margin-top: 2px;
}
.bpc-rush-tag {
	display: inline-block;
	background: #ef4444;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 1px 5px;
	border-radius: 3px;
	margin-left: 5px;
	vertical-align: middle;
}

/* ── Selects ────────────────────────────────────────────────── */
.bpc-select {
	width: 100%;
	padding: 10px 36px 10px 12px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 14px;
	color: #1e293b;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 12px center;
	appearance: none;
	cursor: pointer;
	transition: border-color .14s;
}
.bpc-select:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */

/* ── Cover Preview ──────────────────────────────────────────── */
.bpc-preview-wrap {
	margin-bottom: 16px;
}
.bpc-preview-booklet {
	display: flex;
	align-items: stretch;
	filter: drop-shadow(3px 5px 10px rgba(0,0,0,.22));
	cursor: pointer;
}
.bpc-preview-spine {
	flex-shrink: 0;
	background: linear-gradient(to right, #8a9ab0, #b8c6d8, #dde6f0);
	border-radius: 2px 0 0 2px;
	transition: width .25s ease;
	min-width: 5px;
}
.bpc-preview-face {
	position: relative;
	background: #ffffff;
	border-radius: 0 3px 3px 0;
	overflow: hidden;
	border: 1px solid #d1d5db;
	transition: width .25s ease, height .25s ease;
}
/* page-stack illusion */
.bpc-preview-face::after {
	content: '';
	position: absolute;
	inset: 0;
	box-shadow: inset -4px 0 6px rgba(0,0,0,.06);
	pointer-events: none;
}

.bpc-upload-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #94a3b8;
	text-align: center;
	padding: 12px;
	transition: background .14s;
}
.bpc-upload-placeholder svg {
	opacity: .5;
}
.bpc-upload-placeholder p {
	font-size: 11px;
	line-height: 1.5;
	margin: 0;
}
.bpc-preview-face:hover .bpc-upload-placeholder,
.bpc-preview-face.bpc-drag-over .bpc-upload-placeholder {
	background: rgba(37,99,235,.06);
	color: #2563eb;
}
.bpc-preview-face.bpc-drag-over {
	border-color: #2563eb;
}

.bpc-preview-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: none;
}
.bpc-remove-img {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 22px;
	height: 22px;
	background: rgba(0,0,0,.55);
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 13px;
	line-height: 22px;
	text-align: center;
	cursor: pointer;
	display: none;
	padding: 0;
	z-index: 2;
}
.bpc-remove-img:hover { background: rgba(239,68,68,.85); }

#bpc-file-input { display: none; }

.bpc-preview-caption {
	font-size: 11px;
	color: #94a3b8;
	text-align: center;
	margin: 6px 0 0;
}

/* ── Price Box ──────────────────────────────────────────────── */
.bpc-price-box {
	background: #1e293b;
	border-radius: 12px;
	padding: 22px 18px;
	text-align: center;
	color: #fff;
	margin-bottom: 12px;
}
.bpc-price-heading {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 6px;
}
.bpc-price-total {
	font-size: 40px;
	font-weight: 800;
	color: #fff;
	line-height: 1;
	margin-bottom: 5px;
}
.bpc-price-per {
	font-size: 13px;
	color: #38bdf8;
	margin-bottom: 12px;
	min-height: 19px;
}
.bpc-price-note {
	font-size: 11px;
	color: #475569;
	margin-bottom: 16px;
	line-height: 1.5;
}

/* ── CTA Buttons ────────────────────────────────────────────── */
.bpc-btn-primary,
.bpc-btn-secondary {
	display: block;
	width: 100%;
	padding: 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	border: none;
	margin-bottom: 8px;
	box-sizing: border-box;
	transition: opacity .14s, transform .1s;
}
.bpc-btn-primary {
	background: #2563eb;
	color: #fff;
}
.bpc-btn-primary:hover:not(:disabled) {
	opacity: .9;
	transform: translateY(-1px);
}
.bpc-btn-primary:disabled { opacity: .6; cursor: default; }
.bpc-btn-secondary {
	background: transparent;
	color: #94a3b8;
	border: 2px solid #334155;
}
.bpc-btn-secondary:hover { border-color: #64748b; color: #cbd5e1; }

.bpc-cart-error {
	font-size: 12px;
	color: #f87171;
	margin: 4px 0 0;
	text-align: center;
}

/* ── Order Summary ──────────────────────────────────────────── */
.bpc-summary-list {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #f8fafc;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}
.bpc-summary-list li {
	display: flex;
	justify-content: space-between;
	padding: 7px 12px;
	font-size: 12px;
	border-bottom: 1px solid #e2e8f0;
}
.bpc-summary-list li:last-child { border-bottom: none; }
.bpc-summary-list li span:first-child { color: #64748b; }
.bpc-summary-list li span:last-child { font-weight: 600; color: #1e293b; text-align: right; max-width: 58%; }

/* ═══════════════════════════════════════════════════════════════
   QUOTE MODAL
   ═══════════════════════════════════════════════════════════════ */
.bpc-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,.65);
	z-index: 99999;
	overflow-y: auto;
	padding: 40px 16px;
	box-sizing: border-box;
}
.bpc-modal-box {
	background: #fff;
	border-radius: 14px;
	max-width: 500px;
	margin: 0 auto;
	padding: 32px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.bpc-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 20px;
	color: #94a3b8;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
}
.bpc-modal-close:hover { color: #1e293b; }
.bpc-modal-box h3 {
	margin: 0 0 16px;
	font-size: 20px;
	color: #1e293b;
}

/* Specs table inside modal */
.bpc-specs-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	margin-bottom: 20px;
	background: #f8fafc;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}
.bpc-specs-table td {
	padding: 7px 12px;
	border-bottom: 1px solid #e2e8f0;
}
.bpc-specs-table tr:last-child td { border-bottom: none; }
.bpc-specs-table td:first-child { color: #64748b; width: 45%; }
.bpc-specs-table td:last-child { font-weight: 600; color: #1e293b; }

/* Quote form */
.bpc-form-row {
	margin-bottom: 14px;
}
.bpc-form-row label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 5px;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.bpc-required { color: #ef4444; }
.bpc-form-row input,
.bpc-form-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 14px;
	color: #1e293b;
	font-family: inherit;
	box-sizing: border-box;
	transition: border-color .14s;
}
.bpc-form-row input:focus,
.bpc-form-row textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.bpc-form-row textarea { resize: vertical; min-height: 80px; }

.bpc-form-error {
	font-size: 13px;
	color: #ef4444;
	margin-bottom: 10px;
}
.bpc-submit-btn {
	width: 100%;
	padding: 14px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity .14s;
}
.bpc-submit-btn:hover:not(:disabled) { opacity: .9; }
.bpc-submit-btn:disabled { opacity: .6; cursor: default; }

/* Quote success state */
.bpc-quote-success {
	text-align: center;
	padding: 20px 0;
}
.bpc-success-icon {
	width: 56px;
	height: 56px;
	background: #dcfce7;
	color: #16a34a;
	border-radius: 50%;
	font-size: 28px;
	line-height: 56px;
	margin: 0 auto 16px;
}
.bpc-quote-success h4 {
	font-size: 20px;
	color: #1e293b;
	margin: 0 0 8px;
}
.bpc-quote-success p {
	font-size: 14px;
	color: #64748b;
	margin: 0 0 20px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
	.bpc-row { flex-direction: column; }
	.bpc-sidebar { width: 100%; position: static; }
	.bpc-card { flex: 1 1 calc(50% - 8px); }
	.bpc-price-total { font-size: 34px; }
	.bpc-modal-box { padding: 24px 18px; }
}

/* ═══════════════════════════════════════════════════════════════
   ARTWORK UPLOAD
   ═══════════════════════════════════════════════════════════════ */
.bpc-label-opt {
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: #94a3b8;
	font-size: 11px;
}
.bpc-artwork-drop {
	border: 2px dashed #cbd5e1;
	border-radius: 10px;
	padding: 22px 18px;
	display: flex;
	align-items: center;
	gap: 14px;
	cursor: pointer;
	background: #f8fafc;
	transition: border-color .15s, background .15s;
}
.bpc-artwork-drop:hover,
.bpc-artwork-drop.bpc-drag-over {
	border-color: #2563eb;
	background: #eff6ff;
}
.bpc-artwork-drop svg { flex-shrink: 0; color: #94a3b8; }
.bpc-artwork-drop:hover svg,
.bpc-artwork-drop.bpc-drag-over svg { color: #2563eb; }
.bpc-artwork-drop div { display: flex; flex-direction: column; gap: 3px; }
.bpc-artwork-drop strong { font-size: 14px; color: #1e293b; }
.bpc-artwork-drop span { font-size: 12px; color: #64748b; }
#bpc-artwork-file { display: none; }

/* Progress bar */
.bpc-artwork-progress {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}
.bpc-progress-bar {
	flex: 1;
	height: 6px;
	background: #e2e8f0;
	border-radius: 3px;
	overflow: hidden;
}
.bpc-progress-fill {
	height: 100%;
	background: #2563eb;
	border-radius: 3px;
	width: 0%;
	transition: width .15s;
}
#bpc-progress-pct { font-size: 12px; color: #64748b; white-space: nowrap; }

/* Upload success */
.bpc-artwork-done {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	padding: 10px 14px;
	margin-top: 8px;
}
.bpc-artwork-check {
	width: 24px;
	height: 24px;
	background: #16a34a;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	flex-shrink: 0;
	line-height: 24px;
	text-align: center;
}
.bpc-artwork-info { flex: 1; min-width: 0; }
.bpc-artwork-info strong { display: block; font-size: 13px; color: #15803d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bpc-artwork-info span { font-size: 11px; color: #4ade80; }
.bpc-artwork-remove {
	background: none;
	border: none;
	color: #94a3b8;
	font-size: 12px;
	cursor: pointer;
	padding: 0;
	white-space: nowrap;
}
.bpc-artwork-remove:hover { color: #ef4444; }

.bpc-artwork-error {
	font-size: 12px;
	color: #ef4444;
	margin-top: 6px;
}
.bpc-artwork-hint {
	font-size: 11px;
	color: #94a3b8;
	margin: 6px 0 0;
	line-height: 1.5;
}

/* Artwork row in summary */
.bpc-summary-artwork span:last-child { color: #16a34a !important; }

/* ═══════════════════════════════════════════════════════════════
   DIELINE DOWNLOAD BUTTON
   ═══════════════════════════════════════════════════════════════ */
.bpc-dieline-wrap {
	margin-bottom: 14px;
	text-align: center;
}
.bpc-dieline-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: none;
	border: 1.5px solid #334155;
	color: #94a3b8;
	border-radius: 8px;
	padding: 9px 14px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	justify-content: center;
	transition: border-color .14s, color .14s, background .14s;
}
.bpc-dieline-btn:hover {
	border-color: #2563eb;
	color: #2563eb;
	background: #eff6ff;
}
.bpc-dieline-note {
	font-size: 10px;
	color: #475569;
	margin: 5px 0 0;
	text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   SAVE & SHARE LINK
   ═══════════════════════════════════════════════════════════════ */
.bpc-share-wrap {
	margin-bottom: 10px;
	text-align: center;
}
.bpc-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: none;
	border: 1.5px solid #334155;
	color: #94a3b8;
	border-radius: 8px;
	padding: 9px 14px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	justify-content: center;
	transition: border-color .14s, color .14s, background .14s;
}
.bpc-share-btn:hover {
	border-color: #7c3aed;
	color: #7c3aed;
	background: #f5f3ff;
}
.bpc-share-btn.bpc-copied {
	border-color: #16a34a;
	color: #16a34a;
	background: #f0fdf4;
}
.bpc-share-note {
	font-size: 10px;
	color: #475569;
	margin: 5px 0 0;
	text-align: center;
}

/* Saved config loaded notice */
.bpc-loaded-notice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 12px;
	color: #15803d;
	font-weight: 600;
	margin-bottom: 10px;
	gap: 8px;
}
.bpc-loaded-notice button {
	background: none;
	border: none;
	color: #4ade80;
	cursor: pointer;
	font-size: 14px;
	padding: 0;
	line-height: 1;
	flex-shrink: 0;
}
.bpc-loaded-notice button:hover { color: #15803d; }
