/* Improved Coupons – compact, light styling on the raytoys palette (--rt-* variables), with fallbacks. */
:root {
	--ic-ink: var(--rt-ink, #17202a);
	--ic-muted: var(--rt-muted, #667085);
	--ic-line: var(--rt-line, #e9e8e4);
	--ic-accent: #d63c33;          /* darker --rt-coral, AA contrast on white */
	--ic-accent-strong: #b4231b;
	--ic-tint: #fff4f2;
	--ic-tint-line: #f6d5d0;
	--ic-green: var(--rt-green, #19734a);
}

.ic-icon { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -0.125em; }
.ic-slot[hidden], .ic-vouchers[hidden], .ic-voucher[hidden], .ic-loop-badge[hidden], .ic-modal[hidden] { display: none !important; }

/* Buttons ---------------------------------------------------------------- */
.ic-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .3em;
	min-height: 30px; padding: 0 12px; border: 1px solid var(--ic-tint-line); border-radius: 8px;
	background: #fff; color: var(--ic-accent); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.1;
	cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; white-space: nowrap;
}
.ic-btn:hover:not(:disabled), .ic-btn:focus-visible { border-color: var(--ic-accent); background: var(--ic-tint); }
.ic-btn:focus-visible, .ic-link:focus-visible, .ic-voucher__info:focus-visible, .ic-modal__close:focus-visible { outline: 2px solid rgba(214, 60, 51, .35); outline-offset: 2px; }
.ic-btn:disabled { cursor: default; opacity: .5; }
.ic-btn.is-saved { border-color: #cfe6d9; background: #f2f9f5; color: var(--ic-green); opacity: 1; }
.ic-btn--block { width: 100%; min-height: 40px; border-color: var(--ic-accent); background: var(--ic-accent); color: #fff; font-size: 14px; border-radius: 10px; }
.ic-btn--block:hover:not(:disabled), .ic-btn--block:focus-visible { background: var(--ic-accent-strong); border-color: var(--ic-accent-strong); }
.ic-btn--block.is-saved { border-color: #cfe6d9; background: #f2f9f5; color: var(--ic-green); }
.ic-link { padding: 0; border: 0; background: none; color: var(--ic-muted); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ic-link:hover { color: var(--ic-accent); }

.ic-pill {
	display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--ic-tint); color: var(--ic-accent-strong);
	font-size: 10.5px; font-weight: 600; line-height: 1.5;
}
.ic-pill--muted { background: #f1f2f4; color: #7a828c; }

/* Product page ------------------------------------------------------------ */
.ic-vouchers { display: grid; gap: 6px; margin: 2px 0 14px; }
.ic-voucher {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tags btn" "title btn";
	align-items: center; gap: 2px 12px; padding: 8px 8px 8px 12px; border: 1px solid var(--ic-line); border-left: 3px solid var(--ic-accent);
	border-radius: 8px; background: #fff;
}
.ic-voucher__tags { grid-area: tags; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ic-voucher__badge { display: inline-block; color: var(--ic-accent); font-size: 13px; font-weight: 700; line-height: 1.4; }
.ic-voucher__title { grid-area: title; display: block; margin: 0; color: var(--ic-muted); font-size: 12.5px; font-weight: 400; line-height: 1.4; }
.ic-voucher__title > span { margin-right: 3px; }
.ic-voucher__info {
	display: inline-grid; place-items: center; width: 20px; height: 20px; margin: -2px 0; padding: 0; vertical-align: middle; border: 0; border-radius: 50%;
	background: transparent; color: var(--ic-muted); font-size: 14px; cursor: pointer;
}
.ic-voucher__info:hover { color: var(--ic-accent); background: var(--ic-tint); }
.ic-voucher > .ic-btn--save { grid-area: btn; }

@media (max-width: 600px) {
	.ic-voucher > .ic-btn--save { padding: 0 10px; }
}

/* Product cards ----------------------------------------------------------- */
.ic-loop-badge {
	display: flex; align-items: center; gap: 5px; box-sizing: border-box; width: 100%; margin: 6px 0 0; padding: 3px 8px; border-radius: 6px;
	background: var(--ic-tint); color: var(--ic-accent-strong); font-size: 11.5px; font-weight: 600; line-height: 1.5;
}
.ic-loop-badge .ic-icon { width: 14px; height: 14px; }
.ic-loop-badge > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Modal ------------------------------------------------------------------- */
html.ic-modal-open { overflow: hidden; }
.ic-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px; }
.ic-modal__overlay { position: absolute; inset: 0; background: rgba(23, 32, 42, .45); }
.ic-modal__dialog {
	position: relative; width: min(100%, 400px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto;
	padding: 20px 20px 18px; border-radius: 14px; background: #fff; color: var(--ic-ink); box-shadow: 0 16px 48px rgba(21, 33, 50, .18);
}
.ic-modal__dialog:focus { outline: none; }
.ic-modal__close {
	position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--ic-muted); font-size: 16px; cursor: pointer;
}
.ic-modal__close:hover { background: #f4f4f2; color: var(--ic-ink); }
.ic-modal__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 36px 6px 0; }
.ic-modal__title { margin: 0 0 8px; font-size: 16px; line-height: 1.35; font-weight: 700; }
.ic-modal__details { color: var(--ic-ink); font-size: 13.5px; line-height: 1.55; }
.ic-modal__details p { margin: 0 0 6px; }
.ic-modal__meta, .ic-modal__validity { margin: 0 0 6px; color: var(--ic-muted); font-size: 12px; line-height: 1.5; }
.ic-modal__validity { margin-bottom: 16px; }

/* Toast ------------------------------------------------------------------- */
.ic-toast {
	position: fixed; left: 50%; bottom: 20px; z-index: 100001; max-width: min(92vw, 400px); padding: 9px 14px; border-radius: 10px;
	background: var(--ic-ink); color: #fff; font-size: 13px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
	opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s;
}
.ic-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* "Cupoanele mele" -------------------------------------------------------- */
.ic-mycoupons { margin: 0 0 16px; }
.ic-mycoupons .ic-mycoupons__title, .ic-slot .ic-mycoupons__title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--ic-ink); font-size: 14px; font-weight: 600; line-height: 1.3; }
.ic-mycoupons__title .ic-icon { width: 16px; height: 16px; color: var(--ic-accent); }
.ic-mycoupons__msg { margin: 0 0 6px; color: var(--ic-green); font-size: 12px; font-weight: 500; }
.ic-mycoupons__msg:empty { display: none; }
.ic-mycoupons__msg.is-error { color: var(--ic-accent-strong); }
.ic-mycoupons ul.ic-mycoupons__list, .ic-account ul.ic-account__list { margin: 0; padding: 0; list-style: none; }
.ic-mycoupons ul.ic-mycoupons__list > li, .ic-account ul.ic-account__list > li { margin: 0; padding: 0; }
.ic-mycoupons__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 340px)); gap: 8px; margin: 0; padding: 0; list-style: none; }

/* Ticket card: value | text | action. */
.ic-card {
	position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); margin: 0;
	border: 1px solid var(--ic-line); border-radius: 10px; background: #fff;
}
.ic-card__value {
	display: grid; place-items: center; padding: 8px 4px; border-right: 1px dashed var(--ic-tint-line); border-radius: 9px 0 0 9px;
	background: var(--ic-tint); color: var(--ic-accent); text-align: center;
}
.ic-card__value span { font-size: 16px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ic-card--long-value .ic-card__value span { font-size: 12.5px; }
.ic-card__body {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; column-gap: 10px; row-gap: 1px;
	min-width: 0; padding: 8px 10px;
}
.ic-card__body > * { grid-column: 1; }
.ic-card__body > .ic-pill { justify-self: start; margin-bottom: 2px; }
.ic-card__tags { display: flex; justify-self: start; gap: 4px; margin-bottom: 2px; }
.ic-card__tags .ic-pill { flex: 0 0 auto; width: auto; }
.ic-card__tags:empty, .ic-card__tags:not(:has(*)) { display: none; }
.ic-card__title {
	max-width: 100%; margin: 0; overflow: hidden; color: var(--ic-ink); font-size: 13px; font-weight: 600; line-height: 1.35;
	text-overflow: ellipsis; white-space: nowrap;
}
.ic-card__title--wrap { white-space: normal; }
.ic-card__meta { margin: 0; color: var(--ic-muted); font-size: 11.5px; line-height: 1.4; }
.ic-card__meta--ok { color: var(--ic-muted); font-weight: 400; }
.ic-card__reason { margin: 1px 0 0; color: var(--ic-accent-strong); font-size: 11.5px; font-weight: 500; line-height: 1.35; }
.ic-card__note { margin: 1px 0 0; color: var(--ic-muted); font-size: 11px; font-style: italic; line-height: 1.35; }
.ic-card__actions {
	grid-column: 2; grid-row: 1 / span 8; align-self: center; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.ic-card__actions .ic-btn { min-height: 28px; padding: 0 12px; font-size: 12px; }
.ic-card__applied { color: var(--ic-green); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ic-card--applied { border-color: #cfe6d9; }
.ic-card--applied .ic-card__value { background: #f2f9f5; border-right-color: #cfe6d9; color: var(--ic-green); }
.ic-card--disabled .ic-card__value { filter: grayscale(1); opacity: .6; }
.ic-card--disabled .ic-card__title, .ic-card--disabled .ic-card__meta { color: #98a0aa; }
.ic-card--disabled .ic-pill { background: #f1f2f4; color: #8d949d; }

/* Side cart: compact, scrolls if long, sits right above the footer. */
.ic-slot--drawer { flex: 0 1 auto; min-height: 0; max-height: 36vh; margin-top: auto; padding: 10px 20px 2px; overflow-y: auto; border-top: 1px solid var(--ic-line); }
.ic-slot--drawer + .cart-drawer__footer { margin-top: 0; }
.ic-slot--drawer .ic-mycoupons { margin: 0 0 8px; }
.ic-slot--drawer .ic-mycoupons__title { font-size: 13px; margin-bottom: 6px; }
.ic-slot--drawer .ic-mycoupons__list { grid-template-columns: 1fr; gap: 6px; }

/* Checkout summary column. */
.ic-slot--checkout { margin: 0 0 14px; }
.ic-slot--checkout .ic-mycoupons__list { grid-template-columns: 1fr; }

/* Cart page (above the Cart block). */
.ic-slot--cart { margin: 0 0 20px; }

/* My Account ------------------------------------------------------------- */
.ic-account__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ic-card--account .ic-card__body { row-gap: 2px; padding: 10px 12px; }
.ic-card__applies a { color: var(--ic-accent); text-decoration: underline; text-underline-offset: 2px; }
.ic-code { color: var(--ic-ink); font-weight: 600; letter-spacing: .04em; }

@media (max-width: 600px) {
	.ic-mycoupons__list, .ic-account__list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.ic-toast, .ic-btn { transition: none; }
}
