/* Nalog Booking widget — cal.com-inspired look */
.nb-widget {
	--nb-accent: #296D6C;
	--nb-ink: #111827;
	--nb-muted: #6b7280;
	--nb-line: #e5e7eb;
	--nb-bg: #ffffff;
	--nb-soft: #f4f5f6;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--nb-ink);
	max-width: 980px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.45;
}
.nb-widget *, .nb-widget *::before, .nb-widget *::after { box-sizing: border-box; }
.nb-widget-error { padding: 14px 16px; border: 1px dashed #d63638; color: #d63638; border-radius: 10px; font-family: sans-serif; }
.nb-boot { padding: 40px; text-align: center; color: var(--nb-muted); }

.nb-card {
	background: var(--nb-bg);
	border: 1px solid var(--nb-line);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	overflow: hidden;
}
.nb-main { display: flex; min-height: 420px; }
.nb-pane-info { flex: 0 0 250px; padding: 24px; border-right: 1px solid var(--nb-line); }
.nb-pane-cal { flex: 1 1 auto; padding: 24px; min-width: 0; }
.nb-pane-times { flex: 0 0 232px; padding: 24px 16px 24px 8px; display: flex; flex-direction: column; }

.nb-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; }
.nb-avatar-fallback { width: 52px; height: 52px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 19px; }
.nb-spec-name { font-weight: 700; font-size: 17px; margin: 12px 0 2px; }
.nb-spec-pos { color: var(--nb-muted); font-size: 13px; margin: 0 0 14px; }
.nb-meta-row { display: flex; align-items: center; gap: 8px; color: var(--nb-muted); font-size: 13.5px; margin: 7px 0; }
.nb-meta-row svg { flex: 0 0 16px; }

.nb-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nb-cal-title { font-weight: 600; text-transform: capitalize; }
.nb-cal-nav { display: flex; gap: 4px; }
.nb-cal-nav button {
	width: 32px; height: 32px; border: 1px solid var(--nb-line); background: var(--nb-bg);
	border-radius: 8px; cursor: pointer; color: var(--nb-ink); font-size: 15px; line-height: 1;
}
.nb-cal-nav button:disabled { opacity: .35; cursor: default; }
.nb-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.nb-dow { text-align: center; font-size: 11.5px; color: var(--nb-muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 0; }
.nb-day {
	position: relative; aspect-ratio: 1; border: 0; background: transparent; border-radius: 10px;
	font-size: 14px; color: var(--nb-ink); cursor: pointer; font-weight: 500;
}
.nb-day:not(:disabled) { background: var(--nb-soft); }
.nb-day:not(:disabled):hover { background: #e8eaed; }
.nb-day:disabled { color: #c3c7cd; cursor: default; }
.nb-day.nb-selected { background: var(--nb-accent) !important; color: #fff; }
.nb-day.nb-today::after {
	content: ""; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
	width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .9;
}

.nb-times-head { display: flex; align-items: center; justify-content: space-between; margin: 0 8px 10px; font-size: 14px; }
.nb-times-date { font-weight: 600; }
.nb-fmt-toggle { display: flex; border: 1px solid var(--nb-line); border-radius: 8px; overflow: hidden; }
.nb-fmt-toggle button { border: 0; background: var(--nb-bg); padding: 3px 8px; font-size: 11.5px; cursor: pointer; color: var(--nb-muted); }
.nb-fmt-toggle button.nb-on { background: var(--nb-soft); color: var(--nb-ink); font-weight: 600; }
.nb-times-list { overflow-y: auto; max-height: 380px; padding: 0 8px 4px; flex: 1; }
.nb-slot {
	display: block; width: 100%; margin: 0 0 8px; padding: 10px 0; text-align: center;
	border: 1px solid var(--nb-line); border-radius: 10px; background: var(--nb-bg);
	font-size: 14px; font-weight: 600; color: var(--nb-accent); cursor: pointer;
}
.nb-slot:hover { border-color: var(--nb-accent); }
.nb-times-empty { color: var(--nb-muted); font-size: 13.5px; text-align: center; margin-top: 40px; padding: 0 8px; }

.nb-footbar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	border-top: 1px solid var(--nb-line); padding: 10px 16px; font-size: 13px; color: var(--nb-muted); flex-wrap: wrap;
}
.nb-tz-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nb-tz-select {
	border: 0; background: transparent; color: var(--nb-ink); font-size: 13px; max-width: 260px;
	cursor: pointer; padding: 2px; outline: none;
}

/* Step 2: form */
.nb-form { padding: 26px; max-width: 560px; margin: 0 auto; }
.nb-back { background: none; border: 0; color: var(--nb-muted); cursor: pointer; padding: 0; font-size: 13.5px; margin-bottom: 14px; }
.nb-summary { display: flex; gap: 10px; align-items: flex-start; background: var(--nb-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 20px; font-size: 14px; }
.nb-summary b { display: block; }
/* Written consultation: explains why there is no calendar above the form. */
.nb-req-note { color: var(--nb-muted); font-size: 13.5px; margin: -8px 0 18px; }
.nb-field { margin-bottom: 14px; }
.nb-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.nb-field input, .nb-field textarea {
	width: 100%; border: 1px solid var(--nb-line); border-radius: 10px; padding: 9px 12px;
	font-size: 14.5px; font-family: inherit; color: var(--nb-ink); background: var(--nb-bg);
}
.nb-field input:focus, .nb-field textarea:focus { outline: 2px solid var(--nb-accent); outline-offset: -1px; border-color: transparent; }
.nb-att-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.nb-att-row input { flex: 1; }
.nb-att-remove { border: 0; background: var(--nb-soft); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; color: var(--nb-muted); font-size: 16px; flex: 0 0 34px; }
.nb-add-att { background: none; border: 0; color: var(--nb-accent); font-weight: 600; cursor: pointer; padding: 0; font-size: 13.5px; }
.nb-submit {
	width: 100%; margin-top: 8px; background: var(--nb-accent); border: 0; color: #fff;
	padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.nb-submit:disabled { opacity: .6; cursor: default; }
.nb-form-error { color: #d63638; font-size: 13.5px; margin: 10px 0 0; min-height: 18px; }
.nb-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

/* Step 3: success / status */
.nb-final { padding: 44px 26px; text-align: center; max-width: 520px; margin: 0 auto; }
.nb-final-icon {
	width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: flex;
	align-items: center; justify-content: center; background: #e7f4ec; color: #00a32a; font-size: 26px;
}
.nb-final-icon.nb-wait { background: #fdf3e0; color: #996800; }
.nb-final-icon.nb-fail { background: #fdeaea; color: #d63638; }
.nb-final h3 { margin: 0 0 6px; font-size: 20px; }
.nb-final p { color: var(--nb-muted); margin: 0 0 6px; }
.nb-final-details { text-align: left; background: var(--nb-soft); border-radius: 12px; padding: 14px 16px; margin: 18px 0; font-size: 14px; }
.nb-final-details div { margin: 4px 0; }
.nb-btn-primary {
	display: inline-block; background: var(--nb-accent); color: #fff !important; padding: 11px 20px;
	border-radius: 10px; font-weight: 700; text-decoration: none; margin: 4px 6px;
}
.nb-btn-ghost {
	display: inline-block; border: 1px solid var(--nb-line); color: var(--nb-ink) !important; padding: 10px 18px;
	border-radius: 10px; font-weight: 600; text-decoration: none; margin: 4px 6px; background: var(--nb-bg);
}
.nb-spin {
	width: 22px; height: 22px; border: 3px solid var(--nb-line); border-top-color: var(--nb-accent);
	border-radius: 50%; margin: 0 auto; animation: nb-rot .8s linear infinite;
}
@keyframes nb-rot { to { transform: rotate(360deg); } }

/* CRM order-formation steps on the success screen */
.nb-crm { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--nb-line); text-align: left; }
.nb-crm__row { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 9px; font-size: 13.5px; color: var(--nb-ink); }
.nb-crm__row--wait { color: var(--nb-muted); }
.nb-crm__check {
	flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; background: #e7f4ec; color: #00a32a;
	font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.nb-crm__spin {
	flex: 0 0 18px; width: 14px; height: 14px; margin: 2px 2px 0; border: 2px solid var(--nb-line);
	border-top-color: var(--nb-accent); border-radius: 50%; animation: nb-rot .8s linear infinite;
}
.nb-crm__ref {
	margin: 4px 0 10px 27px; font-size: 15px; font-weight: 700; color: var(--nb-accent);
}
.nb-crm__note { margin: 6px 0 0 27px; font-size: 13px; color: var(--nb-muted); }
.nb-crm__pay { margin: 8px 0 0 27px; }
.nb-crm__deadline {
	margin: 12px 0 0 27px; font-size: 13px; font-weight: 600; color: #8a5a00;
	background: #fdf3e0; border: 1px solid #f3d9a8; border-radius: 8px; padding: 8px 12px;
}

/* Meeting + calendar links block on the success screen (under the pay button) */
.nb-final__links { margin-top: 16px; }

.nb-final__recnote {
	margin: 12px auto 0;
	max-width: 420px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--nb-muted);
}

/* Service picker (cal.com event types) */
.nb-svc-head { font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.nb-svc-list { display: flex; flex-direction: column; gap: 10px; }
.nb-svc-item {
	text-align: left; border: 1px solid var(--nb-line); background: var(--nb-bg);
	border-radius: 12px; padding: 14px 16px; cursor: pointer; font-family: inherit;
	transition: border-color .12s ease, box-shadow .12s ease;
}
.nb-svc-item:hover { border-color: var(--nb-accent); box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.nb-svc-title { font-weight: 600; font-size: 14.5px; color: var(--nb-ink); margin-bottom: 4px; }
.nb-svc-meta { color: var(--nb-muted); font-size: 13px; }
.nb-svc-current { font-size: 13.5px; font-weight: 600; margin: 0 0 10px; padding: 6px 10px; background: var(--nb-soft); border-radius: 8px; }
.nb-svc-change { background: none; border: 0; color: var(--nb-muted); cursor: pointer; padding: 0; font-size: 13px; margin-top: 14px; }
.nb-svc-change:hover { color: var(--nb-accent); }

@media (max-width: 800px) {
	.nb-main { flex-direction: column; }
	.nb-pane-info { flex-basis: auto; border-right: 0; border-bottom: 1px solid var(--nb-line); }
	.nb-pane-times { flex-basis: auto; padding: 0 24px 24px; }
	.nb-times-list { max-height: 260px; }
}

/* Compact mode — embedded in the theme's booking modal (?nb_compact=1).
   The modal header already names the service, format and specialist, so the
   widget's own info pane is redundant; card chrome is dropped too (the modal
   provides it). */
.nb-compact .nb-pane-info { display: none; }
.nb-compact .nb-card { border: 0; box-shadow: none; border-radius: 0; }
.nb-compact .nb-main { min-height: 0; }
.nb-compact .nb-form { padding: 16px; }
.nb-compact .nb-final { padding: 28px 18px; }

/* Smaller calendar so date AND time pickers fit the modal without scrolling. */
.nb-compact .nb-pane-cal { padding: 12px 14px 14px; }
.nb-compact .nb-cal-head { margin-bottom: 8px; }
.nb-compact .nb-cal-title { font-size: 14px; }
.nb-compact .nb-cal-nav button { width: 28px; height: 28px; font-size: 14px; }
.nb-compact .nb-grid { gap: 3px; }
.nb-compact .nb-dow { padding: 3px 0; font-size: 10.5px; }
.nb-compact .nb-day { aspect-ratio: auto; height: 38px; font-size: 13px; border-radius: 8px; }
.nb-compact .nb-day.nb-today::after { bottom: 3px; }
.nb-compact .nb-pane-times { padding: 12px 10px 14px 2px; }
.nb-compact .nb-times-head { margin: 0 6px 8px; font-size: 13px; }
.nb-compact .nb-times-list { max-height: 330px; padding: 0 6px 4px; }
.nb-compact .nb-slot { padding: 8px 0; margin-bottom: 6px; font-size: 13px; border-radius: 8px; }
.nb-compact .nb-footbar { padding: 8px 14px; }

/* The theme modal is ~590px wide — that's below the widget's 800px stacking
   breakpoint, which would push the time list below the fold. Keep the two
   panes side by side whenever the embed is reasonably wide. */
@media (min-width: 520px) {
	.nb-compact .nb-main { flex-direction: row; }
	.nb-compact .nb-pane-cal { flex: 1 1 auto; border-right: 0; }
	.nb-compact .nb-pane-times { flex: 0 0 152px; border-bottom: 0; }
}
@media (max-width: 519px) {
	.nb-compact .nb-pane-times { padding: 0 14px 14px; }
	.nb-compact .nb-times-list { max-height: 240px; }
}
