/* Kalamify Fulfilment. Scoped to .kff-*; the font is inherited from the site. */
.kff-bar,.kff-layer{
	--kff-blue:var(--e-global-color-primary,#0172e6);
	--kff-blue-dark:#015cb9;
	--kff-blue-soft:#eaf3fe;
	--kff-text:#1b1d3c;
	--kff-muted:#5c6078;
	--kff-line:#e2e6ee;
	--kff-ok:#0b7a43;
	--kff-warn:#a15c00;
	--kff-bad:#b42318;
	--kff-radius:14px;
	direction:rtl;
	text-align:right;
	font-family:inherit;
	color:var(--kff-text);
	box-sizing:border-box;
}
.kff-bar *,.kff-layer *{box-sizing:border-box}

/* Controls: override theme button/link rules without !important where specificity is enough. */
.kff-bar .kff-btn,.kff-layer .kff-btn,.kff-launcher{
	display:inline-flex;align-items:center;justify-content:center;gap:6px;
	min-height:44px;margin:0;padding:8px 16px;
	border:1px solid transparent;border-radius:10px;
	font:inherit;font-size:14px;font-weight:600;line-height:1.4;
	text-transform:none;text-decoration:none;text-align:center;letter-spacing:0;
	cursor:pointer;box-shadow:none;white-space:normal;
}
.kff-bar .kff-btn-primary,.kff-layer .kff-btn-primary{background:var(--kff-blue);border-color:var(--kff-blue);color:#fff}
.kff-bar .kff-btn-primary:hover,.kff-layer .kff-btn-primary:hover{background:var(--kff-blue-dark);border-color:var(--kff-blue-dark);color:#fff}
.kff-layer .kff-btn-secondary,.kff-launcher{background:#fff;border-color:var(--kff-blue);color:var(--kff-blue)}
.kff-layer .kff-btn-secondary:hover,.kff-launcher:hover{background:var(--kff-blue-soft);color:var(--kff-blue)}
.kff-layer .kff-btn-text{background:transparent;color:var(--kff-blue);padding-inline:8px}
.kff-layer .kff-btn-text:hover{text-decoration:underline;background:transparent;color:var(--kff-blue)}
.kff-layer .kff-btn-block{display:flex;width:100%}
.kff-launcher{width:100%;margin-block:10px;--kff-blue:var(--e-global-color-primary,#0172e6);--kff-blue-soft:#eaf3fe;font-family:inherit;direction:rtl}
/* Brand-blue outline with an icon and a subtitle, so it never reads as a disabled grey button. */
.kff-launcher{justify-content:flex-start;gap:10px;padding:10px 14px;border-width:1.5px;background:var(--kff-blue-soft);text-align:right}
.kff-launcher-icon{flex:none;color:var(--kff-blue)}
.kff-launcher-text{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.kff-launcher-label{font-size:14px;font-weight:700;color:var(--kff-blue)}
.kff-launcher-sub{font-size:12px;font-weight:500;color:#3d4560;line-height:1.5}
.kff-bar :focus-visible,.kff-layer :focus-visible,.kff-launcher:focus-visible{outline:3px solid #66aaf2;outline-offset:2px}

.kff-bar .kff-close,.kff-layer .kff-close{
	flex:none;display:inline-flex;align-items:center;justify-content:center;
	width:44px;height:44px;min-height:44px;margin:0;padding:0;
	background:transparent;border:0;border-radius:10px;box-shadow:none;
	color:var(--kff-muted);font:inherit;font-size:22px;line-height:1;cursor:pointer;
}
.kff-bar .kff-close:hover,.kff-layer .kff-close:hover{background:#f2f4f8;color:var(--kff-text)}

/* Entry bar. z-index 340 sits under WoodMart's toolbar (350), overlay (389+) and side panels (500). */
.kff-bar{
	position:fixed;z-index:340;
	bottom:calc(var(--kff-bottom,16px) + env(safe-area-inset-bottom,0px));
	left:50%;transform:translateX(-50%);
	display:flex;align-items:center;gap:8px;
	width:min(600px,calc(100vw - 32px));
	padding:6px 14px 6px 6px;
	background:#fff;border:1px solid var(--kff-line);border-radius:var(--kff-radius);
	box-shadow:0 6px 24px rgba(27,29,60,.14);
	animation:kff-rise .25s ease-out;
}
.kff-bar-text{flex:1;min-width:0;margin:0;padding:0;font-size:14px;line-height:1.6}
.kff-bar .kff-btn-primary{flex:none}
@keyframes kff-rise{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}

/* Dialog layer: above the theme, then the chat launcher is hidden while it is open. */
html.kff-lock,html.kff-lock body{overflow:hidden}
.kff-layer{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(27,29,60,.45)}
.kff-layer[hidden]{display:none}
.kff-panel{
	position:relative;display:flex;flex-direction:column;
	width:100%;max-width:520px;max-height:min(86vh,720px);
	background:#fff;border-radius:18px;box-shadow:0 18px 50px rgba(27,29,60,.25);
	animation:kff-fade .2s ease-out;
}
@keyframes kff-fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.kff-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 18px 6px 8px;flex:none}
.kff-title{margin:0;padding:0;font:inherit;font-size:17px;font-weight:700;line-height:1.5;color:var(--kff-text);outline:none}
.kff-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 18px 16px;font-size:14px;line-height:1.7}
.kff-foot{flex:none;padding:12px 18px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--kff-line);background:#fff;border-radius:0 0 18px 18px}
.kff-foot:empty{display:none}
.kff-foot .kff-btn + .kff-btn{margin-top:8px}
.kff-body p{margin:0 0 10px}
.kff-muted{color:var(--kff-muted);font-size:13px}
.kff-actions{display:flex;flex-direction:column;gap:8px;margin-top:12px}

.kff-notice{margin:0 0 12px;padding:10px 12px;border-radius:10px;background:#fff7e8;color:#6b4300;font-size:13px}
.kff-notice-error{background:#fdecea;color:#8c1d13}
.kff-notice-soft{background:#f4f5f8;color:#3d4560;border:1px solid var(--kff-line)}
.kff-notice a{color:var(--kff-blue);font-weight:700;text-decoration:underline}
.kff-notice .kff-btn-text{min-height:44px;padding-inline:0}
.kff-spinner{display:block;width:30px;height:30px;margin:18px auto;border:3px solid var(--kff-blue-soft);border-top-color:var(--kff-blue);border-radius:50%;animation:kff-spin .8s linear infinite}
.kff-center{text-align:center}
@keyframes kff-spin{to{transform:rotate(360deg)}}

.kff-field{display:block;margin:0 0 6px;font-weight:600;font-size:13px}
.kff-layer select.kff-select{display:block;width:100%;min-height:44px;margin:0;padding:8px 12px;border:1px solid var(--kff-line);border-radius:10px;background-color:#fff;color:var(--kff-text);font:inherit;font-size:16px}

.kff-express{margin:0 0 12px;padding:14px;border:1px solid var(--kff-blue);border-radius:var(--kff-radius);background:var(--kff-blue-soft)}
.kff-express-title{display:block;margin-bottom:2px;font-size:13px;font-weight:600;color:var(--kff-blue-dark)}
.kff-express-main{display:block;font-size:17px;font-weight:700;line-height:1.5}
.kff-express-detail{display:block;margin-top:2px;font-size:14px;font-weight:600;color:var(--kff-blue-dark)}
.kff-express-cost{display:block;margin-top:4px;font-size:12px;color:var(--kff-muted)}
.kff-express-off{border-color:var(--kff-line);background:#f7f8fb}
.kff-express-off .kff-express-main{font-size:14px;font-weight:600}
.kff-express-off .kff-express-title{color:var(--kff-muted)}
.kff-express-off .kff-express-detail{color:#3d4560;font-weight:500}

.kff-section{margin:14px 0 8px;font-size:14px;font-weight:700}
.kff-card{margin:0 0 10px;padding:12px;border:1px solid var(--kff-line);border-radius:var(--kff-radius);background:#fff;box-shadow:0 1px 4px rgba(27,29,60,.05)}
.kff-card-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 8px}
.kff-card-name{font-size:15px;font-weight:700}
.kff-pill{display:inline-block;padding:1px 10px;border-radius:99px;font-size:12px;font-weight:600;background:#f2f4f8;color:var(--kff-muted)}
.kff-pill-open{background:#e6f6ee;color:var(--kff-ok)}
/* Closed is usually "until tomorrow morning", so it is neutral rather than alarming red. */
.kff-pill-closed{background:#eef0f4;color:#4a5068}
.kff-pill-near{background:var(--kff-blue-soft);color:var(--kff-blue-dark)}
.kff-card-tags{display:inline-flex;gap:6px;flex-wrap:wrap}
.kff-card-nearest{border-color:var(--kff-blue)}
.kff-card-lines{margin:6px 0 10px;padding:0;list-style:none;font-size:13px}
.kff-card-lines li{margin:2px 0;padding:0;overflow-wrap:anywhere}
.kff-stock-yes{color:var(--kff-ok);font-weight:600}
.kff-stock-no{color:var(--kff-bad);font-weight:600}
.kff-stock-unknown{color:var(--kff-warn);font-weight:600}
.kff-card .kff-btn{width:100%}

/* Choosing a method (before purchase there is no map link, only a choice) */
.kff-choose{margin-top:10px}
.kff-layer .kff-btn[disabled]{border-color:var(--kff-line);background:#f4f5f8;color:#8a8fa3;cursor:not-allowed}
.kff-layer .kff-btn-chosen{background:#e6f6ee;border-color:var(--kff-ok);color:var(--kff-ok)}
.kff-layer .kff-btn-chosen:hover{background:#e6f6ee;color:var(--kff-ok)}
.kff-reason{margin:4px 0 0;font-size:12px;color:var(--kff-muted);text-align:center}
.kff-card.kff-is-chosen,.kff-express.kff-is-chosen{border-color:var(--kff-ok);box-shadow:0 0 0 2px #bfe8d2}
.kff-chosen-note{margin:0 0 12px;padding:10px 12px;border:1px solid #bfe8d2;border-radius:10px;background:#f1fbf6;color:#0b5c33;font-size:13px}
.kff-chosen-note p{margin:0 0 8px}
.kff-chosen-note p:last-child{margin:0}
.kff-chosen-note .kff-btn{width:100%}
.kff-after-order{margin:4px 0 12px;text-align:center}

.kff-grab{display:none}

/* Pickup summary shortcode */
.kff-summary{--kff-blue:var(--e-global-color-primary,#0172e6);--kff-blue-soft:#eaf3fe;direction:rtl;text-align:right;font-family:inherit;color:#1b1d3c;box-sizing:border-box}
/* Empty until loaded, but still laid out: IntersectionObserver never reports a display:none box. */
.kff-summary:not(.kff-summary-ready){display:block;height:0;margin:0;padding:0;border:0;overflow:hidden}
.kff-summary-ready{margin:10px 0;padding:12px 14px;border:1px solid #e2e6ee;border-radius:14px;background:#fff}
.kff-sum-title{margin:0 0 6px;font-size:14px;font-weight:700}
.kff-sum-list{margin:0;padding:0;list-style:none}
.kff-sum-list li{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;margin:0;padding:6px 0;border-top:1px solid #f0f2f6;font-size:13px}
.kff-sum-list li:first-child{border-top:0}
.kff-sum-name{font-weight:700}
.kff-sum-hours{flex-basis:100%;color:#5c6078}
.kff-sum-open{color:#0b7a43}
.kff-sum-tag{padding:0 8px;border-radius:99px;background:#eef0f4;color:#4a5068;font-size:12px;font-weight:600}
.kff-sum-today{background:#e6f6ee;color:#0b7a43}
.kff-sum-no{background:#fff7e8;color:#6b4300}
.kff-sum-note{margin:6px 0 0;font-size:12px;color:#3d4560}
.kff-sum-note a{color:var(--kff-blue);font-weight:700}
.kff-summary .kff-sum-more{display:inline-flex;align-items:center;min-height:44px;margin:4px 0 0;padding:0;border:0;background:none;box-shadow:none;color:var(--kff-blue);font:inherit;font-size:13px;font-weight:700;text-decoration:underline;cursor:pointer}

@media (max-width:767px){
	.kff-grab{display:block;height:20px;margin-bottom:-14px;touch-action:none;cursor:grab}
	.kff-grab::before{content:"";display:block;width:40px;height:4px;margin:8px auto 0;border-radius:4px;background:#c9ceda}
	.kff-head{touch-action:pan-x}
	.kff-bar{left:8px;right:8px;width:auto;transform:none;padding:4px 10px 4px 4px;animation-name:kff-fade}
	.kff-bar-text{font-size:13px;line-height:1.5}
	.kff-bar .kff-btn-primary{padding-inline:12px}
	.kff-layer{align-items:flex-end;padding:0}
	.kff-panel{max-width:none;max-height:88vh;max-height:88dvh;border-radius:18px 18px 0 0;animation-name:kff-sheet}
	.kff-foot{border-radius:0}
	.kff-head{padding-top:12px}
}
@keyframes kff-sheet{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){
	.kff-bar,.kff-panel{animation:none}
	.kff-spinner{animation-duration:2s}
}
