/*
 * Asztal konfigurátor — [bl_table_configurator], Frontend.php.
 *
 * Layout of configuratori.alba.it/en/tipper: picture | option list | tabs, the
 * summary sliding down over the option list, its tab sticking out on the left,
 * and the selected options' link buttons under the picture, with the
 * konfigurátor's own fixed buttons (.blf-tipper__cta) below them. Colours are the
 * theme's --bl-* tokens (with fallbacks, so it also works without the theme).
 */

/* ---- Intro ------------------------------------------------------------ */

.blf-tipper-intro{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:clamp(20px,4vw,56px);align-items:center;margin:0 0 28px}
.blf-tipper-intro__eyebrow{margin:0 0 6px;font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--bl-orange,#E8550D)}
.blf-tipper-intro__title{margin:0 0 .5em;font-size:clamp(1.5rem,2.6vw,2.2rem)}
.blf-tipper-intro__text{margin:0;max-width:62ch;color:var(--bl-ink,#1A1F2B)}
.blf-tipper-intro__media{margin:0;padding:12px;border-radius:var(--bl-radius,10px);background:var(--bl-soft,#F6F8FB)}
.blf-tipper-intro__media img{display:block;width:100%;height:auto;max-height:340px;object-fit:contain;mix-blend-mode:multiply}
@media (max-width:767px){
	.blf-tipper-intro{grid-template-columns:1fr}
}

/* ---- Frame ------------------------------------------------------------ */

.blf-tipper{
	--tp-line:var(--bl-line,#E5E7EB);
	--tp-sel:#E8F0FA;
	--tp-sel-line:#D3DFEE;
	--tp-hover:var(--bl-soft,#F6F8FB);
	--tp-navy:var(--bl-navy,#0B2C5A);
	--tp-blue:var(--bl-blue,#1858A8);
	--tp-orange:var(--bl-orange,#E8550D);
	--tp-muted:var(--bl-muted,#6B7280);
	--tp-radius:var(--bl-radius,10px);
	position:relative;
	display:grid;
	grid-template-columns:minmax(0,1fr) minmax(210px,260px) minmax(170px,210px);
	grid-template-areas:"stage panel tabs";
	height:clamp(560px,calc(100vh - 180px),820px);
	margin:0 0 32px;
	border:1px solid var(--tp-line);
	border-radius:var(--tp-radius);
	background:#fff;
	color:var(--bl-ink,#1A1F2B);
}
.blf-tipper [hidden]{display:none!important}
.blf-tipper button{font-family:inherit}
.blf-tipper__opt:focus-visible,
.blf-tipper__tab:focus-visible,
.blf-tipper__summary-tab:focus-visible{outline:2px solid var(--tp-blue);outline-offset:-2px}

/* ---- Picture + link buttons ------------------------------------------- */

.blf-tipper__stage{grid-area:stage;position:relative;min-width:0;border-radius:var(--tp-radius) 0 0 var(--tp-radius);background:#fff}
.blf-tipper__crea{position:absolute;top:24px;left:26px;z-index:2;margin:0;font-size:clamp(1.1rem,2vw,1.9rem);font-weight:700;line-height:1.2;color:var(--tp-navy)}
.blf-tipper__image{position:absolute;inset:10% 4% 6%}
.blf-tipper__stage.has-links,
.blf-tipper__stage.has-cta{display:flex;flex-direction:column;gap:8px;padding:60px 20px 20px}
.blf-tipper__stage.has-links .blf-tipper__image,
.blf-tipper__stage.has-cta .blf-tipper__image{position:relative;inset:auto;flex:1 1 auto;min-height:0}
.blf-tipper__stage.has-links .blf-tipper__links{position:static;flex:0 0 auto;max-height:150px;overflow:auto}
/* With buttons the title joins the flow: heading, buttons, then the picture. */
.blf-tipper__stage.has-cta{padding-top:20px}
.blf-tipper__stage.has-cta .blf-tipper__crea{position:static;flex:0 0 auto;margin:0 6px}
.blf-tipper__layer{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain}
.blf-tipper__layer--shadow{mix-blend-mode:multiply}
.blf-tipper__links{position:absolute;right:20px;bottom:20px;left:20px;z-index:2;display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.blf-tipper__link{padding:.6em 1.1em;font-size:.9rem;white-space:normal;text-align:center}
.blf-tipper__link::after{content:"→";margin-left:.1em}

/* The konfigurátor's own buttons: under the title, above the picture. */
.blf-tipper__cta{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:10px;max-height:150px;margin:0 4px;padding:2px;overflow:auto}
.blf-tipper__cta-btn{display:inline-flex;align-items:center;gap:.5em;padding:.7em 1.3em;border:1.5px solid var(--tp-navy);border-radius:999px;background:#fff;color:var(--tp-navy);font-size:.92rem;font-weight:600;line-height:1.2;text-align:center;text-decoration:none;transition:background-color .18s,color .18s,border-color .18s,box-shadow .18s,transform .18s}
.blf-tipper__cta-btn svg{flex:0 0 auto;width:15px;height:15px}
.blf-tipper__cta-btn:hover,
.blf-tipper__cta-btn:focus-visible{border-color:var(--tp-orange);background:var(--tp-orange);color:#fff;box-shadow:0 8px 18px rgba(232,85,13,.26);transform:translateY(-1px);text-decoration:none}
.blf-tipper__cta-btn:focus-visible{outline:2px solid var(--tp-navy);outline-offset:2px}
@media (prefers-reduced-motion:reduce){
	.blf-tipper__cta-btn{transition:none}
	.blf-tipper__cta-btn:hover,.blf-tipper__cta-btn:focus-visible{transform:none}
}

/* ---- Option list ------------------------------------------------------ */

.blf-tipper__panel{grid-area:panel;position:relative;min-width:0;border-left:1px solid var(--tp-line);border-right:1px solid var(--tp-line)}
.blf-tipper__panel-inner{position:absolute;inset:0;overflow:hidden}
.blf-tipper__groups{position:absolute;inset:0;overflow:auto}
.blf-tipper__opt{display:flex;align-items:flex-start;gap:10px;width:100%;margin:0;padding:15px 16px;border:0;border-bottom:1px solid var(--tp-line);border-radius:0;background:#fff;color:var(--bl-ink,#1A1F2B);font-size:.95rem;font-weight:500;line-height:1.35;text-align:left;cursor:pointer;transition:background-color .2s,color .2s}
.blf-tipper__check{flex:0 0 18px;width:18px;height:18px;margin-top:1px;border-radius:4px;background:#E1E8F2;transition:background-color .2s,box-shadow .2s}
.blf-tipper__opt.is-selected{background:var(--tp-sel);color:var(--tp-navy);font-weight:600}
.blf-tipper__opt.is-selected .blf-tipper__check{background:var(--tp-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat}
@media (hover:hover){
	.blf-tipper__opt:not(:disabled):hover{background:var(--tp-sel)}
	.blf-tipper__opt:not(:disabled):not(.is-selected):hover .blf-tipper__check{background-color:#fff;box-shadow:inset 0 0 0 1px #C5D3E6}
}
.blf-tipper__opt:disabled{background:#F1F3F6;color:var(--tp-muted);cursor:not-allowed}
.blf-tipper__opt:disabled .blf-tipper__check{background:#E5E7EB}

/* ---- Summary ---------------------------------------------------------- */

.blf-tipper__summary{position:absolute;inset:0;z-index:3;overflow:auto;padding:22px 18px;background:var(--tp-sel);transform:translateY(-100%);visibility:hidden;transition:transform .5s ease,visibility 0s linear .5s}
.blf-tipper.is-summary-open .blf-tipper__summary{transform:none;visibility:visible;transition:transform .5s ease}
.blf-tipper__summary-title{margin:0 0 12px;font-size:1rem;color:var(--tp-navy)}
.blf-tipper__parts{margin:0 0 18px;padding:0;list-style:none;font-size:.88rem;line-height:1.4}
.blf-tipper__parts li{padding:9px 0;border-bottom:1px solid var(--tp-sel-line)}
.blf-tipper__parts li:first-child{padding-top:0}
.blf-tipper__actions{display:grid;gap:10px}
.blf-tipper__actions .blf-btn{width:100%;justify-content:center;text-align:center;white-space:normal}
.blf-tipper__actions .blf-btn--ghost{background:#fff}
.blf-tipper__note{margin:14px 0 0;font-size:.8rem;line-height:1.4;color:var(--tp-muted)}

/* The tab that opens it: vertical, on the option list's left edge. Written
   bottom-to-top by vertical-rl + a half turn, so its sides are mirrored — the
   flat edge declared on the left is the one facing the list. */
.blf-tipper__summary-tab{position:absolute;right:100%;bottom:28px;z-index:4;display:flex;align-items:center;gap:8px;margin:0;padding:14px 9px;border:1px solid var(--tp-line);border-left:0;border-radius:0 10px 10px 0;background:#fff;color:var(--tp-navy);font-size:.75rem;font-weight:700;letter-spacing:.08em;line-height:1;text-transform:uppercase;writing-mode:vertical-rl;transform:rotate(180deg);cursor:pointer;transition:background-color .2s,color .2s,border-color .2s}
.blf-tipper__summary-tab:hover{background:var(--tp-hover)}
.blf-tipper__summary-tab svg{flex:0 0 16px;width:16px;height:16px;transform:rotate(180deg)}
.blf-tipper__summary-tab [data-when]{display:flex;align-items:center;gap:8px}
.blf-tipper__summary-tab [data-when="open"],
.blf-tipper.is-summary-open .blf-tipper__summary-tab [data-when="closed"]{display:none}
.blf-tipper.is-summary-open .blf-tipper__summary-tab [data-when="open"]{display:flex}
.blf-tipper.is-summary-open .blf-tipper__summary-tab{border-color:var(--tp-navy);background:var(--tp-navy);color:#fff}

/* ---- Tabs ------------------------------------------------------------- */

.blf-tipper__tabs{grid-area:tabs;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:auto;border-radius:0 var(--tp-radius) var(--tp-radius) 0}
.blf-tipper__tab{position:relative;display:flex;flex:0 0 auto;align-items:center;gap:12px;width:100%;min-height:88px;margin:0;padding:10px 12px 10px 26px;border:0;border-bottom:1px solid var(--tp-line);border-radius:0;background:#fff;color:var(--tp-navy);font-size:.9rem;font-weight:600;line-height:1.2;text-align:left;cursor:pointer;transition:background-color .2s}
.blf-tipper__tab img{flex:0 0 auto;width:46px;height:50px;object-fit:contain}
.blf-tipper__tab:hover{background:var(--tp-hover)}
.blf-tipper__tab.is-active{background:var(--tp-sel)}
.blf-tipper__tab.is-active::before{content:"";position:absolute;top:50%;left:10px;margin-top:-7px;border-style:solid;border-width:7px 7px 7px 0;border-color:transparent var(--tp-orange) transparent transparent}

/* ---- Offer request ---------------------------------------------------- */

.blf-tipper .blf-tipper__modal{z-index:10050}
.blf-tipper__modal .blf-modal__box{text-align:left}
.blf-tipper__lead{margin:-6px 0 16px;font-size:.9rem;color:var(--tp-muted)}
.blf-tipper__form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.blf-tipper__field-error{margin:-6px 0 12px;font-size:.8rem;color:#B42318}
.blf-tipper .blf-field input.is-invalid{border-color:#D92D20}
.blf-tipper__hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0}
.blf-tipper__formfoot{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:6px}
.blf-tipper__formfoot .blf-btn{width:100%;justify-content:center}
.blf-tipper__status{margin:10px 0 0;font-size:.9rem;color:var(--tp-muted)}
.blf-tipper__status:empty{display:none}
.blf-tipper__status.is-ok{margin-top:0;padding:14px 16px;border-radius:8px;background:#ECFDF3;color:#067647}
.blf-tipper__status.is-error{color:#B42318}
@media (max-width:480px){
	.blf-tipper__form-grid{grid-template-columns:1fr}
}

/* ---- Phone: picture + tabs side by side, options underneath ----------- */

@media (max-width:767px){
	.blf-tipper{grid-template-columns:minmax(0,1fr) 92px;grid-template-rows:minmax(300px,56vh) auto;grid-template-areas:"stage tabs" "panel panel";height:auto}
	.blf-tipper__stage{border-bottom:1px solid var(--tp-line);border-radius:var(--tp-radius) 0 0 0}
	.blf-tipper__crea{top:12px;left:14px;font-size:1.1rem}
	.blf-tipper__image{inset:14% 2% 4%}
	.blf-tipper__stage.has-links,
	.blf-tipper__stage.has-cta{padding:46px 10px 10px}
	.blf-tipper__stage.has-cta{padding-top:12px}
	.blf-tipper__stage.has-links .blf-tipper__links{max-height:120px}
	.blf-tipper__cta{max-height:104px;gap:6px}
	.blf-tipper__cta-btn{padding:.55em .95em;font-size:.8rem}
	.blf-tipper__links{right:10px;bottom:10px;left:10px;gap:6px}
	.blf-tipper__link{padding:.45em .8em;font-size:.8rem}
	.blf-tipper__tabs{border-bottom:1px solid var(--tp-line);border-left:1px solid var(--tp-line);border-radius:0 var(--tp-radius) 0 0}
	.blf-tipper__tab{flex:1 0 auto;flex-direction:column;justify-content:center;gap:3px;min-height:66px;padding:4px;overflow:hidden;font-size:.68rem;text-align:center}
	.blf-tipper__tab img{flex:0 1 auto;width:30px;height:30px;min-height:18px}
	.blf-tipper__tab.is-active::before{display:none}
	.blf-tipper__tab.is-active{box-shadow:inset 3px 0 0 var(--tp-orange)}
	.blf-tipper__panel{height:340px;border:0}
	.blf-tipper__panel-inner{top:48px;border-top:1px solid var(--tp-line)}
	.blf-tipper__summary-tab{top:8px;right:12px;bottom:auto;padding:8px 14px;border:1px solid var(--tp-line);border-radius:999px;writing-mode:horizontal-tb;transform:none}
	.blf-tipper__summary-tab svg{transform:none}
}
