/* ============================================================
   Booking Form Builder — Admin UI (non-builder pages)
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────────────────────── */
.bf-admin-wrap,
.bf-admin-wrap * { box-sizing: border-box; }

/* ── HugeIcons baseline reset ─────────────────────────────────────────────── */
.bf-admin-wrap [class*="hgi-"] {
	font-size: 15px;
	line-height: 1;
	vertical-align: middle;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.bf-btn-primary [class*="hgi-"],
.bf-btn-secondary [class*="hgi-"] {
	font-size: 14px;
}

/* Override WP's default .wrap max-width so our pages use the full admin column */
.bf-admin-page #wpbody-content .wrap,
.bf-admin-page #wpbody-content > .wrap {
	max-width: none;
	padding-right: 20px;
}

.bf-admin-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
	color: #111827;
	margin: 24px 0;
	width: 100%;
}

/* ── Page header ──────────────────────────────────────────────────────────── */
.bf-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 28px;
	gap: 16px;
	flex-wrap: wrap;
}

.bf-page-header-left { min-width: 0; }

.bf-page-header-left h1 {
	font-size: 21px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 3px;
	line-height: 1.25;
	padding: 0;
}

.bf-page-header-left p {
	font-size: 13px;
	color: #6b7280;
	margin: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.bf-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	background: #6366f1;
	color: #fff !important;
	border: none;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .15s, box-shadow .15s;
	white-space: nowrap;
	line-height: 1.4;
}
.bf-btn-primary:hover { background: #4f46e5; box-shadow: 0 2px 8px rgba(99,102,241,.35); }

.bf-btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #fff;
	color: #374151 !important;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none !important;
	transition: all .15s;
	white-space: nowrap;
}
.bf-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; }

.bf-btn-sm {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 11px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none !important;
	transition: all .15s;
	background: transparent;
	color: #374151 !important;
}
.bf-btn-sm:hover  { background: #f3f4f6; border-color: #d1d5db; color: #111827 !important; }
.bf-btn-sm.danger { color: #ef4444 !important; }
.bf-btn-sm.danger:hover { background: #fef2f2; border-color: #fca5a5; color: #ef4444 !important; }
.bf-btn-sm.primary { color: #6366f1 !important; border-color: #c7d2fe; background: #eef2ff; }
.bf-btn-sm.primary:hover { background: #e0e7ff; border-color: #a5b4fc; }

/* ── Toolbar (search + filters) ───────────────────────────────────────────── */
.bf-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.bf-search-field {
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 0 10px 0 12px;
	gap: 7px;
	min-width: 200px;
	flex: 1;
	max-width: 320px;
	transition: border-color .15s, box-shadow .15s;
}
.bf-search-field:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.bf-search-field svg { color: #9ca3af; flex-shrink: 0; }
.bf-search-field input {
	border: none;
	outline: none;
	font-size: 13px;
	color: #111827;
	padding: 9px 0;
	background: transparent;
	width: 100%;
}
.bf-search-field input::placeholder { color: #9ca3af; }
.bf-search-field button {
	border: none;
	background: none;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 5px;
	color: #9ca3af;
	transition: all .15s;
}
.bf-search-field button:hover { background: #f3f4f6; color: #374151; }

/* ── Card ──────────────────────────────────────────────────────────────────── */
.bf-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
}

/* ── Table ──────────────────────────────────────────────────────────────────── */
.bf-table {
	width: 100%;
	border-collapse: collapse;
}
.bf-table thead th {
	padding: 10px 16px;
	text-align: left;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #6b7280;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
	white-space: nowrap;
}
.bf-table tbody td {
	padding: 13px 16px;
	border-bottom: 1px solid #f3f4f6;
	color: #374151;
	vertical-align: middle;
	font-size: 13.5px;
}
.bf-table tbody tr:last-child td { border-bottom: none; }
.bf-table tbody tr { transition: background .1s; }
.bf-table tbody tr:hover td { background: #fafafa; }
.bf-table thead th:first-child,
.bf-table tbody td:first-child { padding-left: 20px; }
.bf-table thead th:last-child,
.bf-table tbody td:last-child  { padding-right: 20px; }
.bf-table input[type="checkbox"] {
	width: 15px; height: 15px;
	accent-color: #6366f1;
	cursor: pointer;
	vertical-align: middle;
}

/* ── Sortable header ──────────────────────────────────────────────────────── */
.bf-table th.sortable a {
	color: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.bf-table th.sortable a:hover { color: #111827; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.bf-empty-state {
	text-align: center;
	padding: 64px 24px;
}
.bf-empty-state .bf-empty-icon {
	width: 64px; height: 64px;
	background: #f3f4f6;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}
.bf-empty-state .bf-empty-icon svg { opacity: .45; }
.bf-empty-state h3 {
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	margin: 0 0 6px;
}
.bf-empty-state p {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 20px;
}

/* ── Shortcode badge ──────────────────────────────────────────────────────── */
.bf-sc-copy {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 4px 9px;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: 11.5px;
	color: #374151 !important;
	cursor: pointer;
	transition: all .15s;
	max-width: 210px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none !important;
	user-select: none;
}
.bf-sc-copy:hover   { background: #eef2ff; border-color: #a5b4fc; color: #6366f1 !important; }
.bf-sc-copy.copied  { background: #d1fae5; border-color: #6ee7b7; color: #065f46 !important; }
.bf-sc-copy svg     { flex-shrink: 0; }

/* ── Count pill ───────────────────────────────────────────────────────────── */
.bf-count-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	background: #eef2ff;
	color: #6366f1;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background .15s;
}
.bf-count-pill:hover { background: #e0e7ff; color: #4f46e5; }
.bf-count-pill.zero { background: #f3f4f6; color: #9ca3af; }

/* ── Form name link ───────────────────────────────────────────────────────── */
.bf-form-name {
	font-weight: 600;
	color: #111827 !important;
	text-decoration: none !important;
	font-size: 14px;
}
.bf-form-name:hover { color: #6366f1 !important; }

.bf-form-meta {
	font-size: 11.5px;
	color: #9ca3af;
	margin-top: 2px;
}

/* ── Row actions ──────────────────────────────────────────────────────────── */
.bf-row-acts { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }

/* ── Date cell ────────────────────────────────────────────────────────────── */
.bf-date-cell {
	font-size: 12.5px;
	color: #6b7280;
	white-space: nowrap;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.bf-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	border-top: 1px solid #f3f4f6;
	background: #fff;
	font-size: 12.5px;
	color: #6b7280;
}
.bf-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	padding: 0 6px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 12.5px;
	color: #374151;
	transition: all .15s;
	font-weight: 500;
}
.bf-pagination .page-numbers:hover  { background: #f3f4f6; }
.bf-pagination .page-numbers.current { background: #6366f1; color: #fff; }
.bf-pagination .page-numbers.dots   { pointer-events: none; }

/* ── Status tabs ──────────────────────────────────────────────────────────── */
.bf-status-tabs {
	display: flex;
	gap: 2px;
	background: #f3f4f6;
	border-radius: 8px;
	padding: 3px;
}
.bf-status-tab {
	padding: 5px 11px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	color: #6b7280;
	text-decoration: none !important;
	transition: all .15s;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}
.bf-status-tab:hover { color: #111827; background: rgba(0,0,0,.04); }
.bf-status-tab.active {
	background: #fff;
	color: #111827;
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.bf-status-count {
	background: #e5e7eb;
	color: #6b7280;
	border-radius: 10px;
	padding: 0 5px;
	font-size: 10px;
	font-weight: 700;
	min-width: 16px;
	text-align: center;
	display: inline-block;
	line-height: 16px;
	height: 16px;
}
.bf-status-tab.active .bf-status-count { background: #eef2ff; color: #6366f1; }

/* ── Filter select ────────────────────────────────────────────────────────── */
.bf-filter-select {
	appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 8px 30px 8px 11px;
	font-size: 13px;
	color: #374151;
	cursor: pointer;
	min-width: 150px;
	outline: none;
	transition: border-color .15s;
}
.bf-filter-select:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }

/* ── Bulk bar ─────────────────────────────────────────────────────────────── */
.bf-bulk-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 10px;
}
.bf-bulk-bar select {
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 6px 28px 6px 10px;
	font-size: 12.5px;
	color: #374151;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center;
	appearance: none;
	outline: none;
	cursor: pointer;
}
.bf-bulk-bar button {
	padding: 6px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	font-size: 12.5px;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	transition: all .15s;
}
.bf-bulk-bar button:hover { background: #f3f4f6; border-color: #9ca3af; }
.bf-bulk-msg { font-size: 12px; color: #10b981; font-weight: 500; }

/* ── Entry status indicator ───────────────────────────────────────────────── */
.bf-unread-dot {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: #6366f1;
	display: inline-block;
}
.bf-star-icon { color: #f59e0b; font-size: 14px; line-height: 1; }
.bf-entry-unread td { font-weight: 600 !important; }

/* ── Entry preview in table ───────────────────────────────────────────────── */
.bf-payment-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.bf-entry-snippet {
	font-size: 12px;
	color: #6b7280;
	max-width: 160px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Entry detail modal ───────────────────────────────────────────────────── */
.bf-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.bf-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17,24,39,.5);
	backdrop-filter: blur(2px);
}
.bf-modal-box {
	position: relative;
	background: #fff;
	border-radius: 14px;
	width: 560px;
	max-width: calc(100vw - 40px);
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0,0,0,.22);
	animation: bf-modal-in .18s ease;
}
@keyframes bf-modal-in {
	from { transform: scale(.96) translateY(10px); opacity: 0; }
	to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
.bf-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 22px;
	border-bottom: 1px solid #f3f4f6;
}
.bf-modal-header h2 {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	margin: 0;
}
.bf-modal-close-btn {
	width: 28px; height: 28px;
	border: none;
	background: #f3f4f6;
	border-radius: 6px;
	cursor: pointer;
	font-size: 17px;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .15s;
	line-height: 1;
}
.bf-modal-close-btn:hover { background: #e5e7eb; color: #111827; }
.bf-modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.bf-modal-footer {
	padding: 12px 22px;
	border-top: 1px solid #f3f4f6;
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
.bf-entry-meta-grid {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	padding: 10px 14px;
	background: #f9fafb;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 12px;
	color: #6b7280;
}
.bf-entry-meta-grid strong { color: #374151; }
.bf-entry-detail-table { width: 100%; border-collapse: collapse; }
.bf-entry-detail-table th,
.bf-entry-detail-table td {
	padding: 8px 12px;
	border-bottom: 1px solid #f3f4f6;
	font-size: 13px;
	text-align: left;
}
.bf-entry-detail-table th { font-weight: 600; color: #6b7280; width: 38%; background: #fafafa; }
.bf-entry-detail-table td { color: #111827; }
.bf-entry-detail-table tr:last-child th,
.bf-entry-detail-table tr:last-child td { border-bottom: none; }

/* ── Notice banners ───────────────────────────────────────────────────────── */
.bf-notice {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 20px;
	border: 1px solid transparent;
}
.bf-notice.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.bf-notice.error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ── Settings layout ─────────────────────────────────────────────────────── */
.bf-settings-grid {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 32px;
	align-items: start;
}
.bf-settings-sidebar { position: sticky; top: 40px; }
.bf-settings-nav { display: flex; flex-direction: column; gap: 2px; }
.bf-settings-nav-link {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	color: #374151 !important;
	text-decoration: none !important;
	transition: all .15s;
}
.bf-settings-nav-link:hover   { background: #f3f4f6; color: #111827 !important; }
.bf-settings-nav-link.active  { background: #eef2ff; color: #6366f1 !important; font-weight: 600; }
.bf-settings-nav-link svg     { opacity: .7; flex-shrink: 0; }

.bf-settings-section {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	margin-bottom: 20px;
	overflow: hidden;
}
.bf-settings-section-head {
	padding: 14px 22px;
	border-bottom: 1px solid #f3f4f6;
	background: #fafafa;
}
.bf-settings-section-head h2 {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 2px;
}
.bf-settings-section-head p {
	font-size: 12px;
	color: #6b7280;
	margin: 0;
}
.bf-settings-field {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 16px;
	padding: 16px 22px;
	border-bottom: 1px solid #f9fafb;
	align-items: start;
}
.bf-settings-field:last-child { border-bottom: none; }
.bf-settings-label {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	padding-top: 8px;
}
.bf-settings-label small {
	display: block;
	font-size: 11.5px;
	font-weight: 400;
	color: #9ca3af;
	margin-top: 2px;
}
.bf-settings-input input[type="text"],
.bf-settings-input input[type="number"] {
	width: 220px;
	padding: 8px 11px;
	border: 1px solid #d1d5db;
	border-radius: 7px;
	font-size: 13px;
	color: #111827;
	background: #fff;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	font-family: inherit;
}
.bf-settings-input input:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.bf-field-hint {
	font-size: 12px;
	color: #9ca3af;
	margin-top: 5px;
	line-height: 1.5;
}
.bf-settings-save-bar {
	padding: 14px 22px;
	display: flex;
	align-items: center;
	gap: 12px;
	border-top: 1px solid #e5e7eb;
}
.bf-save-msg { font-size: 13px; color: #10b981; font-weight: 500; }

/* ── Loading state ────────────────────────────────────────────────────────── */
.bf-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	color: #9ca3af;
	font-size: 13px;
	gap: 8px;
}
