/* Circus Quote Builder — themeable via CSS variables.
   Override these in your theme to match any brand (Circus, Scream Ridge, etc.). */
:root {
	--cqb-accent: #ff335b;
	--cqb-accent-contrast: #ffffff;
	--cqb-text: #1f2328;
	--cqb-muted: #6b7280;
	--cqb-border: #e5e7eb;
	--cqb-card-bg: #ffffff;
	--cqb-radius: 10px;
	--cqb-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
}

.cqb-grid {
	display: grid;
	grid-template-columns: repeat(var(--cqb-cols, 3), minmax(0, 1fr));
	gap: 20px;
	margin: 1.5em 0;
}
@media (max-width: 900px) { .cqb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cqb-grid { grid-template-columns: 1fr; } }

.cqb-card {
	display: flex;
	flex-direction: column;
	background: var(--cqb-card-bg);
	border: 1px solid var(--cqb-border);
	border-radius: var(--cqb-radius);
	overflow: hidden;
	box-shadow: var(--cqb-shadow);
}
.cqb-card-media img { display: block; width: 100%; height: 180px; object-fit: cover; }
.cqb-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cqb-card-title { margin: 0; font-size: 1.1rem; line-height: 1.25; }
.cqb-card-desc { margin: 0; color: var(--cqb-muted); font-size: .9rem; }
.cqb-card-price { margin-top: auto; font-weight: 700; }
.cqb-unit { font-weight: 400; color: var(--cqb-muted); font-size: .85em; }
.cqb-norate { color: var(--cqb-accent); font-weight: 700; }

.cqb-add {
	margin-top: 10px;
	padding: 10px 14px;
	border: 0;
	border-radius: 100px;
	background: var(--cqb-accent);
	color: var(--cqb-accent-contrast);
	font-weight: 600;
	cursor: pointer;
	transition: filter .15s ease, transform .05s ease;
}
.cqb-add:hover { background: var(--cqb-accent); }
.cqb-add:active { transform: translateY(1px); }
.cqb-add .is-added { background: #0A9695; }
.cqb-add .is-added::after { content: " ✓"; }

/* Floating tray */
.cqb-tray-toggle {
	position: fixed;
	right: 20px; bottom: 20px;
	z-index: 9998;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 18px;
	border: 0; border-radius: 999px;
	background: var(--cqb-accent); color: var(--cqb-accent-contrast);
	font-weight: 700; cursor: pointer;
	box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.cqb-tray-icon { font-size: 1.5em; }
.cqb-tray-count {
	background: #fff; color: var(--cqb-accent);
	border-radius: 999px; min-width: 22px; height: 22px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: .8rem; padding: 0 6px;
}

/* Modal */
.cqb-modal { position: fixed; inset: 0; z-index: 9999; }
.cqb-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.cqb-modal-panel {
	position: relative;
	max-width: 520px; margin: 6vh auto; max-height: 88vh; overflow: auto;
	background: #fff; border-radius: var(--cqb-radius);
	padding: 24px; box-shadow: var(--cqb-shadow);
}
.cqb-modal-panel h2 { margin: 0 0 12px; }
.cqb-modal-x {
	position: absolute; top: 10px; right: 12px;
	border: 0; background: transparent; font-size: 1.6rem; line-height: 1;
	cursor: pointer; color: var(--cqb-muted);
}
body.cqb-lock { overflow: hidden; }

.cqb-items { list-style: none; margin: 0 0 16px; padding: 0; }
.cqb-item {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 0; border-bottom: 1px solid var(--cqb-border);
}
.cqb-item-info { display: flex; flex-direction: column; }
.cqb-item-title { font-weight: 600; }
.cqb-item-price { font-size: .85rem; color: var(--cqb-muted); }
.cqb-item-controls { display: flex; align-items: center; gap: 6px; }
.cqb-qty-btn {
	width: 26px; height: 26px; border: 1px solid var(--cqb-border);
	background: #fff; border-radius: 6px; cursor: pointer; font-size: 1rem; line-height: 1;
}
.cqb-qty { min-width: 18px; text-align: center; }
.cqb-remove {
	margin-left: 4px; border: 0; background: transparent;
	color: var(--cqb-muted); font-size: 1.2rem; cursor: pointer;
}

.cqb-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cqb-field { display: flex; flex-direction: column; gap: 4px; }
.cqb-field-full { grid-column: 1 / -1; }
.cqb-field label { font-size: .85rem; font-weight: 600; }
.cqb-field input, .cqb-field textarea {
	padding: 9px 10px; border: 1px solid var(--cqb-border); border-radius: 8px;
	font: inherit; width: 100%;
}
.cqb-actions { display: flex; align-items: center; gap: 12px; }
.cqb-submit {
	padding: 11px 18px; border: 0; border-radius: 100px;
	background: var(--cqb-accent); color: var(--cqb-accent-contrast);
	font-weight: 700; cursor: pointer;
}

.cqb-submit:hover {
	padding: 11px 18px; border: 0; border-radius: 100px;
	background: var(--cqb-accent); color: var(--cqb-accent-contrast);
	font-weight: 700; cursor: pointer;
}

.cqb-submit:disabled { opacity: .6; cursor: default; }
.cqb-status { font-size: .9rem; }
.cqb-status.is-ok { color: #2e7d32; }
.cqb-status.is-error { color: #b91c1c; }
.cqb-empty-msg { color: var(--cqb-muted); }
@media (max-width: 480px) { .cqb-form { grid-template-columns: 1fr; } }

/* ---- Inline trigger + item lightbox (v2) ---- */
.cqb-trigger-wrap { display: inline-block; margin: 10px 0;}
.cqb-trigger {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 16px; border: 0; border-radius: 100px;
	background: var(--cqb-accent); color: var(--cqb-accent-contrast);
	font-weight: 600; cursor: pointer; transition: filter .15s ease, transform .05s ease;
}
.cqb-trigger:hover { background: var(--cqb-accent); color: yellow;}
.cqb-trigger:active { transform: translateY(1px); }

.cqb-lb-panel { max-width: 560px; }
.cqb-lb-head { margin-bottom: 14px; }
.cqb-lb-img {
	display: block; width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover;
	border-radius: 8px; margin-bottom: 12px; 
}
.cqb-lb-name { margin: 0 0 4px; font-size: 1.35rem; line-height: 1.2; }
.cqb-lb-price { font-weight: 700; }
.cqb-lb-desc { color: var(--cqb-text); }
.cqb-lb-desc p { margin: 0 0 .75em; }
.cqb-lb-add { margin-top: 16px; width: 100%; }
.cqb-lb-add.is-added { background: #2e7d32; }

.svg-icon {
  width: 1.25em; /* Scales dynamically with text size */
  height: 1.25em;
  fill: currentColor; /* Inherits the color of the text span */
}