/* Floristería Smart Add-ons: popup. Hereda la tipografía del tema. */
.fsad-overlay {
	--fsad-accent: #8a2f4d;
	--fsad-accent-dark: #6e233d;
	--fsad-ok: #3f6b3a;
	--fsad-err: #a32020;
	--fsad-text: #2b2326;
	--fsad-muted: #6a5f63;
	--fsad-line: #e6dcde;
	--fsad-blush: #fbf1f3;
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow-y: auto;
	background: rgba(36, 24, 29, 0.55);
	font-size: 15px;
	line-height: 1.4;
	animation: fsad-fade 0.18s ease-out;
}
html.fsad-lock { overflow: hidden; }

.fsad-dialog {
	box-sizing: border-box;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 18px 18px 16px;
	color: var(--fsad-text);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 18px 50px rgba(36, 24, 29, 0.3);
	animation: fsad-rise 0.22s ease-out;
}
.fsad-dialog:focus { outline: none; }
.fsad-dialog *, .fsad-dialog *::before, .fsad-dialog *::after { box-sizing: border-box; }

.fsad-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fsad-title { margin: 0; padding: 0; font-size: 18px; font-weight: 600; line-height: 1.25; color: var(--fsad-text); }
.fsad-title::before { content: "\2713"; display: inline-block; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--fsad-ok); color: #fff; font-size: 14px; line-height: 24px; text-align: center; vertical-align: 1px; }
.fsad-close { flex: none; width: 44px; height: 44px; margin: -8px -8px -8px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fsad-text); font-size: 28px; line-height: 1; cursor: pointer; }
.fsad-close:hover { background: var(--fsad-blush); }

.fsad-main { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--fsad-line); }
.fsad-main-info, .fsad-card-text { flex: 1; min-width: 0; }
.fsad-thumb { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--fsad-blush); }
.fsad-name { display: block; font-weight: 600; word-break: break-word; }
.fsad-price { display: block; margin-top: 2px; color: var(--fsad-muted); font-size: 14px; }

.fsad-subtitle { margin: 16px 0 6px; padding: 0; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--fsad-text); }
.fsad-lead { margin: 0 0 8px; color: var(--fsad-muted); }

.fsad-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.fsad-item { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border: 1px solid var(--fsad-line); border-radius: 10px; background: #fff; }
.fsad-item.is-selected { border-color: var(--fsad-accent); background: var(--fsad-blush); }
.fsad-item.is-added { opacity: 0.75; }
.fsad-card { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; margin: 0; cursor: pointer; }
.fsad-card .fsad-thumb { width: 52px; height: 52px; }
.fsad-check { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--fsad-accent); cursor: pointer; }
.fsad-badge { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--fsad-ok); color: #fff; font-size: 12px; }

.fsad-qty { display: inline-flex; flex: none; align-items: center; border: 1px solid var(--fsad-line); border-radius: 8px; background: #fff; }
.fsad-qty-btn { width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--fsad-text); font-size: 18px; line-height: 1; cursor: pointer; }
.fsad-qty-btn:hover { background: var(--fsad-blush); }
.fsad-qty-input { width: 32px; height: 36px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--fsad-text); font-size: 15px; text-align: center; box-shadow: none; }

.fsad-totals { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--fsad-line); }
.fsad-total-row { display: flex; justify-content: space-between; gap: 12px; color: var(--fsad-muted); font-size: 14px; }
.fsad-total-row--main { margin-top: 4px; color: var(--fsad-text); font-size: 17px; font-weight: 600; }
.fsad-note { margin: 4px 0 0; color: var(--fsad-muted); font-size: 12px; }

.fsad-status { min-height: 0; margin-top: 10px; font-size: 14px; }
.fsad-status:not(:empty) { padding: 8px 10px; border-radius: 8px; }
.fsad-status--ok { background: #eaf3e8; color: var(--fsad-ok); }
.fsad-status--error { background: #fbeaea; color: var(--fsad-err); }

.fsad-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.fsad-go { display: flex; gap: 8px; }
.fsad-go .fsad-btn { flex: 1; }
.fsad-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 10px 14px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background 0.15s; }
.fsad-btn--add { width: 100%; background: var(--fsad-text); color: #fff; }
.fsad-btn--add:hover { background: #000; color: #fff; }
.fsad-btn--primary { background: var(--fsad-accent); color: #fff; }
.fsad-btn--primary:hover { background: var(--fsad-accent-dark); color: #fff; }
.fsad-btn--ghost { background: #fff; color: var(--fsad-text); border-color: var(--fsad-line); }
.fsad-btn--ghost:hover { background: var(--fsad-blush); color: var(--fsad-text); }
.fsad-link { align-self: center; min-height: 40px; margin: 0; padding: 6px 10px; border: 0; background: transparent; color: var(--fsad-muted); font-size: 14px; text-decoration: underline; cursor: pointer; }
.fsad-link:hover { color: var(--fsad-text); background: transparent; }

.fsad-dialog.is-busy { cursor: progress; }
.fsad-btn.is-loading { pointer-events: none; opacity: 0.85; }
.fsad-btn.is-loading::after { content: ""; width: 16px; height: 16px; margin-left: 10px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: fsad-spin 0.7s linear infinite; }

.fsad-dialog a:focus-visible, .fsad-dialog button:focus-visible, .fsad-dialog input:focus-visible { outline: 3px solid #1d5fd1; outline-offset: 2px; }

@keyframes fsad-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fsad-rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fsad-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
	.fsad-overlay { align-items: flex-end; padding: 0; }
	.fsad-dialog { max-width: none; max-height: 92vh; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 16px 16px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
	.fsad-overlay, .fsad-dialog, .fsad-btn.is-loading::after { animation: none; }
}
