/* Rasam LOM — launcher card + modal */
.rasam-lom, .rlom-modal {
	--rlom-green: #46b04a;
	--rlom-green-dark: #2e9b35;
	--rlom-red: #ff0d0d;
	--rlom-input: #f2f2f2;
	--rlom-border: #e6e6e6;
	--rlom-text: #333;
	--rlom-muted: #777;
	--rlom-blue: #1f4e78;
	direction: rtl;
	text-align: right;
	color: var(--rlom-text);
	font-family: inherit;
	line-height: 1.8;
}
.rasam-lom *, .rlom-modal *, .rlom-modal *::before, .rlom-modal *::after { box-sizing: border-box; }
.rasam-lom [hidden], .rlom-modal [hidden], .rlom-modal[hidden] { display: none !important; }

/* launcher on the product page */
.rasam-lom { margin: 16px 0; }
.rlom-launcher { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; border-radius: 18px; border: 1px solid #cfe9d1; background: radial-gradient(120% 90% at 100% 0%, #e7f6e8 0%, #f7fcf7 45%, #ffffff 100%); box-shadow: 0 6px 22px rgba(46,155,53,.10); transition: transform .2s, box-shadow .2s; }
.rlom-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(46,155,53,.16); }
.rlom-launcher::after { content: ""; position: absolute; left: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(70,176,74,.08); pointer-events: none; }
.rlom-l-top { display: flex; align-items: center; gap: 10px; }
.rlom-l-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--rlom-green); color: #fff; box-shadow: 0 4px 12px rgba(70,176,74,.35); flex: 0 0 auto; }
.rlom-l-kicker { font-size: .78rem; font-weight: 700; color: var(--rlom-green-dark); background: #fff; border: 1px solid #cfe9d1; padding: 2px 10px; border-radius: 20px; }
.rlom-l-title { margin: 4px 0 0; font-size: 1.15rem; line-height: 1.6; font-weight: 800; color: #1d3b1f; }
.rlom-l-text { margin: 0; font-size: .86rem; line-height: 1.9; color: #555; }
.rlom-l-points { list-style: none; margin: 2px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rlom-l-points li { position: relative; padding-right: 22px; font-size: .82rem; color: #3a3a3a; }
.rlom-l-points li::before { content: "✓"; position: absolute; right: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: #e3f4e4; color: var(--rlom-green-dark); font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.rlom-l-cta { width: 100%; margin-top: auto; min-height: 52px; font-size: 1rem; box-shadow: 0 6px 16px rgba(70,176,74,.35); }
.rlom-l-arrow { display: inline-block; transition: transform .2s; }
.rlom-l-cta:hover .rlom-l-arrow { transform: translateX(-5px); }
@media (min-width: 1000px) {
	.rlom-launcher { aspect-ratio: 1 / 1; max-height: 460px; justify-content: space-between; }
	.rlom-l-title { font-size: 1.3rem; }
}

/* modal shell */
.rlom-modal { position: fixed; inset: 0; z-index: 999999; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.rlom-panel { background: #fff; width: 100%; max-width: 860px; height: min(88vh, 900px); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 48px rgba(0,0,0,.3); }
.rlom-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rlom-border); flex: 0 0 auto; }
.rlom-head-titles { flex: 1; min-width: 0; }
.rlom-head-title { font-weight: 700; color: var(--rlom-green-dark); font-size: 1rem; }
.rlom-head-sub { font-size: .8rem; color: var(--rlom-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.rlom-icon-btn { background: #f2f2f2; border: 0; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #444; flex: 0 0 auto; padding: 0; }
.rlom-icon-btn:hover { background: #e7e7e7; }
.rlom-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px; overscroll-behavior: contain; }
.rlom-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--rlom-border); background: #fff; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.rlom-foot-info { font-size: .85rem; color: var(--rlom-muted); }
.rlom-foot-info.rlom-foot-warn { color: #b26a00; }
.rlom-loading { color: var(--rlom-muted); padding: 10px 0; text-align: center; }

/* fields */
.rlom-top { display: flex; flex-wrap: wrap; gap: 0 14px; }
.rlom-top .rlom-field { flex: 1 1 240px; }
.rlom-field { margin-bottom: 12px; }
.rlom-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; }
.rlom-input { width: 100%; background: var(--rlom-input); border: 1px solid transparent; border-radius: 12px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--rlom-text); outline: none; min-height: 46px; }
.rlom-input:focus { border-color: var(--rlom-green); background: #fff; }
.rlom-invalid .rlom-input { border-color: #e53935; background: #fff5f5; }
.rlom-err { color: #d32f2f; font-size: .8rem; margin-top: 3px; }
.rlom-err:empty { display: none; }
.rlom-hint { color: var(--rlom-muted); font-size: .8rem; margin: 4px 0 8px; }

/* sections */
.rlom-section { border: 1px solid var(--rlom-border); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.rlom-section > summary { cursor: pointer; list-style: none; padding: 11px 14px; display: flex; align-items: center; gap: 8px; font-weight: 700; background: #fafafa; }
.rlom-section > summary::-webkit-details-marker { display: none; }
.rlom-section > summary::after { content: "⌄"; color: var(--rlom-muted); transition: transform .15s; }
.rlom-section[open] > summary::after { transform: rotate(180deg); }
.rlom-sec-name { flex: 1; }
.rlom-badge { background: #fff3e0; color: #e65100; font-size: .7rem; padding: 0 8px; border-radius: 20px; font-weight: 600; }
.rlom-count { background: #e8f5e9; color: var(--rlom-green-dark); font-size: .72rem; padding: 0 9px; border-radius: 20px; }
.rlom-sec-body { padding: 8px 12px 12px; }
.rlom-search { margin-bottom: 6px; min-height: 40px; padding: 7px 12px; }
.rlom-options { max-height: 50vh; overflow-y: auto; }
.rlom-opt { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid #f2f2f2; border-radius: 8px; }
.rlom-opt.rlom-on { background: #eef8ef; }
.rlom-opt.rlom-filtered { display: none; }
.rlom-opt-main { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; margin: 0; font-weight: 400; min-width: 0; }
.rlom-opt-main input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--rlom-green-dark); flex: 0 0 auto; margin: 0; }
.rlom-opt-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rlom-opt-name { font-size: .88rem; text-align: left; overflow-wrap: anywhere; line-height: 1.6; }
.rlom-opt-name small { color: var(--rlom-muted); }
.rlom-opt-pn { font-family: ui-monospace, Consolas, monospace; font-size: .75rem; color: var(--rlom-muted); text-align: left; }

/* stepper */
.rlom-stepper { display: inline-flex; align-items: stretch; border-radius: 10px; overflow: hidden; direction: ltr; flex: 0 0 auto; height: 42px; }
.rlom-step { background: var(--rlom-green); color: #fff; border: 0; width: 40px; font-size: 1.3rem; font-weight: 700; cursor: pointer; line-height: 1; padding: 0; }
.rlom-step:active { background: var(--rlom-green-dark); }
.rlom-qty-val { width: 52px; border: 0; background: #e6e6e6; text-align: center; font: inherit; font-size: 16px; padding: 0; -moz-appearance: textfield; }
.rlom-qty-val::-webkit-outer-spin-button, .rlom-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rlom-stepper-sm { height: 34px; }
.rlom-stepper-sm .rlom-step { width: 32px; font-size: 1.1rem; }
.rlom-stepper-sm .rlom-qty-val { width: 40px; }

/* step 2: list */
.rlom-subtitle { font-size: 1rem; margin: 0 0 10px; color: var(--rlom-blue); }
.rlom-lom { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid #c9d3df; border-radius: 12px; overflow: hidden; counter-reset: lom; }
.rlom-lom li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #e3e8ef; counter-increment: lom; }
.rlom-lom li:nth-child(even) { background: #f2f5f9; }
.rlom-lom li:last-child { border-bottom: 0; }
.rlom-lom li::before { content: counter(lom); color: var(--rlom-muted); font-size: .8rem; min-width: 18px; }
.rlom-lom-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rlom-lom-cat { font-size: .72rem; color: var(--rlom-blue); font-weight: 700; }
.rlom-lom-name { font-size: .86rem; text-align: left; overflow-wrap: anywhere; line-height: 1.6; }
.rlom-lom-pn { font-family: ui-monospace, Consolas, monospace; font-size: .74rem; color: var(--rlom-muted); text-align: left; }
.rlom-lom-qty { font-weight: 700; color: var(--rlom-blue); white-space: nowrap; }
.rlom-warnings { background: #fff8e1; border: 1px solid #ffe082; border-radius: 10px; padding: 8px 26px 8px 12px; margin: 0 0 12px; font-size: .85rem; color: #6d4c00; }
.rlom-alert { background: #ffebee; border: 1px solid #ffcdd2; color: #b71c1c; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; white-space: pre-line; }

/* contact form (sample design) */
.rlom-contact { border-top: 1px dashed var(--rlom-border); padding-top: 14px; }
.rlom-modal-title { color: var(--rlom-green-dark); font-size: 1.1rem; font-weight: 700; text-align: center; margin: 0 0 14px; }
.rlom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.rlom-consult { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #cfe8d0; background: #f6fbf6; border-radius: 12px; padding: 11px 14px; margin: 2px 0 12px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.rlom-consult input { width: 22px; height: 22px; accent-color: var(--rlom-green-dark); margin: 0; order: 2; }
.rlom-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0; }
.rlom-qty-label { font-size: .88rem; }
.rlom-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.rlom-msg { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: #f5f5f5; font-size: .9rem; }
.rlom-msg.rlom-ok { background: #e8f5e9; color: #1b5e20; }
.rlom-msg.rlom-bad { background: #ffebee; color: #b71c1c; white-space: pre-line; }

/* buttons */
.rlom-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.rlom-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 10px 20px; font: inherit; font-weight: 700; font-size: .92rem; color: #fff; cursor: pointer; min-height: 46px; white-space: nowrap; }
.rlom-btn:hover { filter: brightness(.95); }
.rlom-btn[disabled] { opacity: .45; cursor: not-allowed; }
.rlom-btn-green { background: var(--rlom-green); }
.rlom-btn-red { background: var(--rlom-red); min-width: 130px; }
.rlom-grow { flex: 1; }
html.rlom-noscroll, html.rlom-noscroll body { overflow: hidden; }

/* mobile: full-screen sheet */
@media (max-width: 640px) {
	.rlom-launcher { padding: 16px; gap: 8px; }
	.rlom-l-title { font-size: 1.05rem; }
	.rlom-modal { padding: 0; align-items: stretch; }
	.rlom-panel { max-width: none; height: 100%; height: 100dvh; border-radius: 0; }
	.rlom-body { padding: 12px; }
	.rlom-grid { grid-template-columns: 1fr; }
	.rlom-foot { flex-direction: column; align-items: stretch; gap: 6px; }
	.rlom-foot .rlom-btn { width: 100%; }
	.rlom-foot-info { text-align: center; }
	.rlom-actions .rlom-btn { flex: 1 1 100%; }
	.rlom-opt { flex-wrap: wrap; }
	.rlom-opt .rlom-stepper { margin-right: 32px; }
}

/* defaults & auto-added items */
.rlom-default { background: #e3f2fd; color: #1565c0; font-size: .7rem; padding: 0 8px; border-radius: 20px; font-weight: 600; flex: 0 0 auto; }
.rlom-auto-items { background: #f3f8ff; border: 1px solid #d6e6fb; border-radius: 10px; padding: 4px 8px; margin-bottom: 8px; }
.rlom-auto-item { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.rlom-auto-item + .rlom-auto-item { border-top: 1px solid #e3edf9; }
.rlom-auto-check { color: #1565c0; font-weight: 700; width: 22px; text-align: center; }
.rlom-auto-qty { font-weight: 700; color: var(--rlom-blue); white-space: nowrap; }

/* desktop: options + live list side by side (like the desktop app) */
.rlom-live { display: none; }
@media (min-width: 1000px) {
	.rlom-panel { max-width: 1280px; height: 92vh; }
	.rlom-step1 { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
	.rlom-live { display: block; position: sticky; top: 0; max-height: calc(92vh - 150px); overflow-y: auto; border: 1px solid #c9d3df; border-radius: 12px; background: #fbfcfe; }
	.rlom-live-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--rlom-blue); color: #fff; position: sticky; top: 0; z-index: 1; }
	.rlom-live-head span { font-size: .8rem; opacity: .9; }
	.rlom-live-warn { background: #fff8e1; color: #6d4c00; font-size: .78rem; padding: 6px 12px; border-bottom: 1px solid #ffe082; }
	.rlom-lom-sm { border: 0; border-radius: 0; margin: 0; }
	.rlom-lom-sm li { padding: 6px 10px; }
	.rlom-lom-sm .rlom-lom-name { font-size: .8rem; }
}

.rlom-opt-hint { display: block; margin-top: 3px; font-size: .76rem; color: #8a5a00; background: #fff8e6; border-radius: 6px; padding: 2px 8px; text-align: right; direction: rtl; }
.rlom-opt-hint b { color: #b26a00; }
