/**
 * Slotify Bookings admin page.
 * Badges, card spacing, muted text. Enqueued only on Slotify Bookings page.
 */

.slotify-bookings-wrap .wrap {
	max-width: 1400px;
	width: 100%;
	box-sizing: border-box;
}

/* Filter card – single row, uses full width */
.slotify-bookings-wrap .slotify-card:first-of-type {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-left: 0;
	margin-right: 0;
}
.slotify-bookings-filters {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	border-radius: 4px;
	padding: 1rem 1.25rem;
	margin: 0 0 1.25rem;
}

.slotify-bookings-filters__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem 1.25rem;
	width: 100%;
}

.slotify-bookings-filters__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
	flex: 1 1 0;
}

.slotify-bookings-filters__field label {
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
	line-height: 1.3;
	white-space: nowrap;
}

.slotify-bookings-filters__field select,
.slotify-bookings-filters__field input[type="text"] {
	height: 32px;
	padding: 0 8px;
	font-size: 13px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	min-width: 100px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.slotify-bookings-filters__field select:focus,
.slotify-bookings-filters__field input[type="text"]:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.slotify-bookings-filters__search {
	flex: 1.5 1 0;
	min-width: 140px;
}

.slotify-bookings-filters__actions {
	display: flex;
	align-items: flex-end;
	flex: 0 0 auto;
}

.slotify-bookings-filters__actions .button {
	height: 32px;
	line-height: 30px;
	padding: 0 12px;
	font-size: 13px;
}

/* Status badges */
.slotify-badge {
	display: inline-block;
	padding: 0.2em 0.6em;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	border-radius: 4px;
	text-transform: capitalize;
}

.slotify-badge.slotify-confirmed {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.slotify-badge.slotify-pending {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fde68a;
}

.slotify-badge.slotify-cancelled {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.slotify-badge.slotify-no-show {
	background: #f3f4f6;
	color: #4b5563;
	border: 1px solid #e5e7eb;
}

.slotify-badge.slotify-completed {
	background: #dbeafe;
	color: #1e40af;
	border: 1px solid #93c5fd;
}

.slotify-badge.slotify-refunded,
.slotify-badge.is-refunded {
	background: #f3f4f6;
	color: #6b7280;
	border: 1px solid #e5e7eb;
}

/* Customer column */
.slotify-customer-name {
	font-weight: 600;
	color: #1d2327;
	display: block;
}

.slotify-customer-email {
	font-size: 12px;
	color: #646970;
	margin-top: 0.2em;
	display: block;
}

.slotify-customer-email a {
	color: #2271b1;
	text-decoration: none;
}

.slotify-customer-email a:hover {
	text-decoration: underline;
}

/* Staff column: avatar + name */
.slotify-booking-staff {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.slotify-booking-staff-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	border-radius: 50%;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	flex-shrink: 0;
}

.slotify-booking-staff-avatar--photo {
	object-fit: cover;
	padding: 0;
}

.slotify-booking-staff-name {
	white-space: nowrap;
}

/* Initial colors (same palette as staff list) */
.slotify-booking-staff-avatar[data-initial="A"],
.slotify-booking-staff-avatar[data-initial="N"] { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.slotify-booking-staff-avatar[data-initial="B"],
.slotify-booking-staff-avatar[data-initial="O"] { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }
.slotify-booking-staff-avatar[data-initial="C"],
.slotify-booking-staff-avatar[data-initial="P"] { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.slotify-booking-staff-avatar[data-initial="D"],
.slotify-booking-staff-avatar[data-initial="Q"] { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.slotify-booking-staff-avatar[data-initial="E"],
.slotify-booking-staff-avatar[data-initial="R"] { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.slotify-booking-staff-avatar[data-initial="F"],
.slotify-booking-staff-avatar[data-initial="S"] { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); }
.slotify-booking-staff-avatar[data-initial="G"],
.slotify-booking-staff-avatar[data-initial="T"] { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.slotify-booking-staff-avatar[data-initial="H"],
.slotify-booking-staff-avatar[data-initial="U"] { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); }
.slotify-booking-staff-avatar[data-initial="I"],
.slotify-booking-staff-avatar[data-initial="V"] { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.slotify-booking-staff-avatar[data-initial="J"],
.slotify-booking-staff-avatar[data-initial="W"] { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.slotify-booking-staff-avatar[data-initial="K"],
.slotify-booking-staff-avatar[data-initial="X"] { background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%); }
.slotify-booking-staff-avatar[data-initial="L"],
.slotify-booking-staff-avatar[data-initial="Y"] { background: linear-gradient(135deg, #e11d48 0%, #be123c 100%); }
.slotify-booking-staff-avatar[data-initial="M"],
.slotify-booking-staff-avatar[data-initial="Z"] { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
.slotify-booking-staff-avatar:not([data-initial]) { background: linear-gradient(135deg, #64748b 0%, #475569 100%); }

/* Muted text */
.slotify-muted {
	color: #646970;
	font-size: 13px;
}

/* Row actions: secondary (links) and primary (small buttons) */
.slotify-row-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	font-size: 13px;
}

.slotify-row-actions-secondary {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 0.25em;
	color: #646970;
}

.slotify-row-actions-secondary .button-link,
.slotify-row-actions-secondary a {
	text-decoration: none;
	color: #2271b1;
}

.slotify-row-actions-secondary .button-link:hover,
.slotify-row-actions-secondary a:hover {
	text-decoration: underline;
	color: #135e96;
}

.slotify-row-actions-primary {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.slotify-row-actions-primary .button {
	margin: 0;
}

.slotify-row-actions .slotify-sep {
	margin: 0 0.15em;
	color: #c3c4c7;
	font-weight: normal;
}

/* Table: horizontal scroll on small screens so Staff and Start (Local) don't overlap */
.slotify-bookings-wrap .wp-list-table {
	margin-top: 0;
	table-layout: fixed;
	width: 100%;
}
@media screen and (max-width: 1200px) {
	.slotify-bookings-wrap .wp-list-table {
		table-layout: auto;
		min-width: 900px;
	}
	.slotify-bookings-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		margin: 0 -1px 0 0;
	}
}
/* Staff column: min width so name + avatar don't squash into Start (Local) */
.slotify-bookings-wrap .wp-list-table .slotify-col-staff {
	min-width: 120px;
	white-space: nowrap;
}
.slotify-bookings-wrap .wp-list-table .slotify-col-staff .slotify-booking-staff {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	max-width: 100%;
}
.slotify-bookings-wrap .wp-list-table .slotify-col-staff .slotify-booking-staff-name {
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}
/* Start (Local) column: min width so date/time don't overlap */
.slotify-bookings-wrap .wp-list-table .slotify-col-start {
	min-width: 90px;
}

/* ID column: narrow width */
.slotify-bookings-wrap .wp-list-table .slotify-col-id {
	width: 3em;
	min-width: 3em;
	max-width: 4em;
}

.slotify-bookings-wrap .wp-list-table thead th {
	padding: 0.75rem 1rem;
	font-weight: 600;
}

.slotify-bookings-wrap .wp-list-table tbody td {
	padding: 0.75rem 1rem;
	vertical-align: middle;
}

.slotify-bookings-wrap .wp-list-table tbody tr:hover .slotify-row-actions {
	visibility: visible;
}

/* Start date cell: day + time */
.slotify-start-date {
	line-height: 1.4;
}

.slotify-start-date small {
	display: block;
	color: #646970;
	font-size: 12px;
	margin-top: 0.15em;
}

/* Created: relative or date */
.slotify-created {
	font-size: 13px;
	color: #646970;
}

/* Pagination */
.slotify-bookings-wrap .tablenav {
	margin-top: 1rem;
}

/* View booking drawer (side panel from right) – hidden until "View" is clicked */
#slotify-view-booking-drawer {
	display: none !important;
	visibility: hidden !important;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
	pointer-events: none;
}

#slotify-view-booking-drawer[aria-hidden="false"] {
	display: block !important;
	visibility: visible !important;
	pointer-events: auto;
}

.slotify-drawer-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	transition: opacity 0.2s ease;
}

.slotify-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-left: 1px solid #c3c4c7;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.25s ease;
}

.slotify-drawer[aria-hidden="false"] .slotify-drawer-panel {
	transform: translateX(0);
}

body.slotify-drawer-open {
	overflow: hidden;
}

.slotify-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #c3c4c7;
	flex-shrink: 0;
}

.slotify-drawer-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.slotify-drawer-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	padding: 0.25rem;
	cursor: pointer;
	color: #646970;
}

.slotify-drawer-close:hover {
	color: #1d2327;
}

.slotify-drawer-body {
	padding: 1.25rem;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}

.slotify-booking-detail-loading {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: #646970;
}

.slotify-booking-detail-loading.slotify-loading-hidden {
	display: none !important;
}

.slotify-booking-detail-content.slotify-content-hidden {
	display: none !important;
}

.slotify-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #c3c4c7;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: slotify-spin 0.7s linear infinite;
}

@keyframes slotify-spin {
	to { transform: rotate(360deg); }
}

.slotify-drawer-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #c3c4c7;
}

.slotify-drawer-actions .button {
	margin: 0;
}

.slotify-booking-detail-dl {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 0.5rem 1rem;
	margin: 0;
	font-size: 14px;
}

.slotify-booking-detail-dl dt {
	font-weight: 600;
	color: #1d2327;
}

.slotify-booking-detail-dl dd {
	margin: 0;
	color: #50575e;
}

.slotify-booking-detail-dl dd .slotify-badge {
	margin-right: 0.25rem;
}

.slotify-confirm-link-input {
	font-size: 12px;
	margin-top: 0.25rem;
}

.slotify-drawer-body .slotify-error {
	color: #b32d2e;
	margin: 0;
}

/* Change status form in booking detail */
.slotify-change-status-form {
	margin: 0.75rem 0 0;
}
.slotify-change-status-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}
.slotify-change-status-row .slotify-select-status {
	min-width: 140px;
	padding: 4px 8px;
	font-size: 13px;
}
.slotify-notify-row {
	margin-top: 0.25rem;
}
.slotify-notify-label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: normal;
	cursor: pointer;
}
.slotify-booking-detail-payment-action {
	margin: 0.75rem 0 0;
}

/* Empty state */
.slotify-empty-state {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	padding: 2rem;
}

.slotify-empty-state-content {
	text-align: center;
	max-width: 360px;
}

.slotify-empty-state-message {
	font-size: 15px;
	color: #1d2327;
	margin: 0 0 1rem;
	line-height: 1.5;
}

.slotify-empty-state-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

/* Bulk actions bar */
.slotify-bookings-wrap .tablenav.top {
	margin-bottom: 0.5rem;
}

.slotify-bookings-wrap .tablenav .bulkactions select {
	margin-right: 0.5rem;
}

.slotify-bookings-wrap .wp-list-table .check-column {
	width: 2.2em;
	padding: 0.5rem;
	vertical-align: middle;
}

.slotify-bookings-wrap .wp-list-table thead .check-column {
	padding: 0.5rem;
}
