/* BingoCR Car Rental – Admin styles
   Design system: soft neutrals, single red accent, 12px radii,
   layered shadows. Scoped to .bingocr-admin-wrap so the rest of
   wp-admin (and the media modal) is untouched. */

.bingocr-admin-wrap {
	--a-bg:        #f6f7f9;
	--a-card:      #ffffff;
	--a-border:    #e6e8ec;
	--a-border-2:  #d3d7dd;
	--a-text:      #1a1d23;
	--a-muted:     #6b7280;
	--a-primary:   #e63946;
	--a-primary-d: #c92b38;
	--a-green:     #16a34a;
	--a-amber:     #d97706;
	--a-blue:      #2563eb;
	--a-radius:    12px;
	--a-radius-sm: 8px;
	--a-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
	--a-shadow-md: 0 4px 16px rgba(16, 24, 40, .08);
	--a-shadow-lg: 0 20px 50px rgba(16, 24, 40, .22);

	max-width: 1200px;
	color: var(--a-text);
}

/* ── Page heading ──────────────────────────────────────────────────── */

.bingocr-admin-wrap > h1 {
	font-size: 1.7em;
	font-weight: 700;
	letter-spacing: -.015em;
	color: var(--a-text);
	padding: 0 0 6px;
	margin-bottom: 24px;
	border: none;
	position: relative;
	display: inline-block;
}

.bingocr-admin-wrap > h1::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 44px;
	height: 4px;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--a-primary), #f07c85);
}

/* ── Buttons (scoped overrides of WP defaults) ─────────────────────── */

.bingocr-admin-wrap .button,
.bingocr-modal-wrap .button {
	border-radius: var(--a-radius-sm);
	border: 1px solid var(--a-border-2);
	background: var(--a-card);
	color: var(--a-text);
	font-weight: 600;
	padding: 2px 14px;
	min-height: 34px;
	line-height: 2.2;
	box-shadow: var(--a-shadow-sm);
	transition: border-color .15s, box-shadow .15s, background .15s, transform .1s;
}

.bingocr-admin-wrap .button:hover,
.bingocr-modal-wrap .button:hover {
	border-color: #b8bec7;
	background: #fafbfc;
	color: var(--a-text);
}

.bingocr-admin-wrap .button:active,
.bingocr-modal-wrap .button:active { transform: translateY(1px); }

.bingocr-admin-wrap .button-primary,
.bingocr-modal-wrap .button-primary {
	background: linear-gradient(180deg, var(--a-primary), var(--a-primary-d));
	border-color: var(--a-primary-d);
	color: #fff;
	text-shadow: none;
	box-shadow: 0 2px 8px rgba(230, 57, 70, .35);
}

.bingocr-admin-wrap .button-primary:hover,
.bingocr-modal-wrap .button-primary:hover {
	background: linear-gradient(180deg, #ee4d59, var(--a-primary));
	border-color: var(--a-primary-d);
	color: #fff;
	box-shadow: 0 4px 14px rgba(230, 57, 70, .45);
}

/* ── Inputs (scoped) ───────────────────────────────────────────────── */

.bingocr-admin-wrap input[type="text"],
.bingocr-admin-wrap input[type="number"],
.bingocr-admin-wrap input[type="email"],
.bingocr-admin-wrap input[type="date"],
.bingocr-admin-wrap input[type="search"],
.bingocr-admin-wrap select,
.bingocr-admin-wrap textarea,
.bingocr-modal-wrap input[type="text"],
.bingocr-modal-wrap input[type="number"],
.bingocr-modal-wrap input[type="email"],
.bingocr-modal-wrap input[type="date"],
.bingocr-modal-wrap select,
.bingocr-modal-wrap textarea {
	border-radius: var(--a-radius-sm, 8px);
	border: 1px solid #d3d7dd;
	box-shadow: none;
	min-height: 34px;
	padding: 4px 12px;
	transition: border-color .15s, box-shadow .15s;
}

.bingocr-admin-wrap input:focus,
.bingocr-admin-wrap select:focus,
.bingocr-admin-wrap textarea:focus,
.bingocr-modal-wrap input:focus,
.bingocr-modal-wrap select:focus,
.bingocr-modal-wrap textarea:focus {
	border-color: #e63946;
	box-shadow: 0 0 0 3px rgba(230, 57, 70, .12);
	outline: none;
}

/* ── Stats dashboard ───────────────────────────────────────────────── */

.bingocr-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 16px;
	margin: 24px 0;
}

.bingocr-stat-card {
	background: var(--a-card);
	border: 1px solid var(--a-border);
	border-radius: var(--a-radius);
	padding: 22px 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: var(--a-shadow-sm);
	position: relative;
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}

.bingocr-stat-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--a-primary), transparent 70%);
	opacity: .9;
}

.bingocr-stat-card:hover {
	box-shadow: var(--a-shadow-md);
	transform: translateY(-2px);
}

.bingocr-stat-label {
	font-size: .74em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--a-muted);
}

.bingocr-stat-value {
	font-size: 2.1em;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--a-text);
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.bingocr-stat-pending::before { background: linear-gradient(90deg, var(--a-amber), transparent 70%); }
.bingocr-stat-pending .bingocr-stat-value { color: var(--a-amber); }
.bingocr-stat-revenue::before { background: linear-gradient(90deg, var(--a-green), transparent 70%); }
.bingocr-stat-revenue .bingocr-stat-value { color: var(--a-green); }

/* ── Quick links & shortcode hint ──────────────────────────────────── */

.bingocr-quick-links { margin: 24px 0; display: flex; gap: 10px; flex-wrap: wrap; }

.bingocr-shortcode-hint {
	background: var(--a-card);
	border: 1px solid var(--a-border);
	border-left: 4px solid var(--a-primary);
	border-radius: var(--a-radius-sm);
	padding: 16px 20px;
	margin: 20px 0;
	box-shadow: var(--a-shadow-sm);
}

.bingocr-shortcode-hint code {
	background: #f6f7f9;
	border: 1px solid var(--a-border);
	padding: 3px 9px;
	border-radius: 6px;
	font-size: .95em;
	color: var(--a-primary-d);
}

/* ── Plan badge ────────────────────────────────────────────────────── */

.bcr-plan-badge {
	display: inline-block;
	font-size: .48em;
	font-weight: 700;
	padding: 5px 14px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: .1em;
	vertical-align: middle;
	margin-left: 12px;
	line-height: 1.5;
}
.bcr-plan-free { background: #eef0f3; color: #4b5563; }
.bcr-plan-pro  { background: linear-gradient(135deg, #f5d061, #d4af37); color: #4a3800; box-shadow: 0 1px 4px rgba(212, 175, 55, .4); }

/* ── Pro upsell card (free build, gated feature) ───────────────────── */

.bingocr-pro-upsell {
	text-align: center;
	padding: 32px 24px;
	border: 1px dashed #d4af37;
	border-radius: 10px;
	background: linear-gradient(180deg, #fffdf5, #fdf8e9);
	margin-top: 4px;
}
.bingocr-pro-upsell .bcr-plan-badge { margin-left: 0; font-size: 11px; }
.bingocr-pro-upsell__title {
	margin: 14px 0 6px;
	font-size: 1.15em;
	color: #1f2937;
}
.bingocr-pro-upsell__desc {
	max-width: 560px;
	margin: 0 auto 18px;
	color: #4b5563;
	line-height: 1.6;
}

/* ── Upgrade banner ────────────────────────────────────────────────── */

.bcr-upgrade-banner {
	border-left: 4px solid var(--a-primary) !important;
	background: #fff7f7 !important;
	border-radius: 0 var(--a-radius-sm) var(--a-radius-sm) 0;
	margin-bottom: 20px !important;
}

/* ── Toolbar ───────────────────────────────────────────────────────── */

.bingocr-toolbar { margin: 18px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bingocr-toolbar input, .bingocr-toolbar select { min-width: 190px; }

/* ── Section blocks (Pricing page) ────────────────────────────────── */

.bingocr-section {
	background: var(--a-card);
	border: 1px solid var(--a-border);
	border-radius: var(--a-radius);
	margin: 24px 0;
	overflow: hidden;
	box-shadow: var(--a-shadow-sm);
}

.bingocr-section-header {
	background: #fafbfc;
	padding: 16px 22px;
	border-bottom: 1px solid var(--a-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.bingocr-section-header h2 {
	margin: 0;
	padding: 0;
	border: none;
	font-size: .8em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .09em;
	color: var(--a-muted);
}

/* ── Data tables ───────────────────────────────────────────────────── */

.bingocr-table {
	width: 100%;
	border-collapse: collapse;
}

.bingocr-table th {
	background: #fafbfc;
	text-align: left;
	padding: 11px 16px;
	font-size: .74em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--a-muted);
	border-bottom: 1px solid var(--a-border);
	white-space: nowrap;
}

.bingocr-table td {
	padding: 13px 16px;
	border-bottom: 1px solid #f1f2f4;
	vertical-align: middle;
}

.bingocr-table tbody tr { transition: background .12s; }
.bingocr-table tbody tr:hover td { background: #f8fafc; }
.bingocr-table tbody tr:last-child td { border-bottom: none; }

/* WP list tables rendered by JS (reservations) get the same card look */
.bingocr-admin-wrap .wp-list-table {
	border: 1px solid var(--a-border);
	border-radius: var(--a-radius);
	overflow: hidden;
	box-shadow: var(--a-shadow-sm);
	border-collapse: separate;
	border-spacing: 0;
}

.bingocr-admin-wrap .wp-list-table th {
	background: #fafbfc;
	font-size: .74em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--a-muted);
	padding: 11px 16px;
	border-bottom: 1px solid var(--a-border);
}

.bingocr-admin-wrap .wp-list-table td {
	padding: 13px 16px;
	vertical-align: middle;
}

.bingocr-admin-wrap .wp-list-table.striped > tbody > :nth-child(odd) { background: transparent; }
.bingocr-admin-wrap .wp-list-table tbody tr:hover { background: #f8fafc; }

.bingocr-empty {
	text-align: center;
	padding: 40px 20px;
	color: var(--a-muted);
	font-style: italic;
	margin: 0;
}

/* ── Pricing modifier colours ──────────────────────────────────────── */

.bcr-modifier-up   { color: #dc2626; font-weight: 600; }
.bcr-modifier-down { color: var(--a-green); font-weight: 600; }
.bcr-modifier-zero { color: var(--a-muted); }

/* ── Modal overlay ─────────────────────────────────────────────────── */

.bingocr-modal-wrap {
	position: fixed;
	inset: 0;
	background: rgba(15, 17, 21, .45);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.bingocr-modal {
	background: #fff;
	border-radius: 16px;
	padding: 28px;
	max-width: 680px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 50px rgba(16, 24, 40, .22);
	animation: bcrModalIn .18s ease-out;
}

@keyframes bcrModalIn {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

.bingocr-modal h2 {
	margin-top: 0;
	font-size: 1.2em;
	font-weight: 700;
	letter-spacing: -.01em;
}

/* Sectioned modal (header bar + body padding) */
.bingocr-modal--panel { padding: 0; }

.bingocr-modal-head {
	background: #fafbfc;
	border-bottom: 1px solid #e6e8ec;
	border-radius: 16px 16px 0 0;
	padding: 16px 26px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.bingocr-modal-head h2 { margin: 0; font-size: 1em; }

.bingocr-modal-body { padding: 26px; }

/* ── Form layout ───────────────────────────────────────────────────── */

.bingocr-form-row { margin-bottom: 18px; }

.bingocr-form-row label {
	display: block;
	font-size: .82em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #6b7280;
	margin-bottom: 4px;
}

.bingocr-two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bingocr-three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.bingocr-form-row input,
.bingocr-form-row select,
.bingocr-form-row textarea { width: 100%; box-sizing: border-box; }

.bingocr-form-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid #eef0f3;
}

.bingocr-form-message { font-size: .88em; }

/* ── Status badges (pill + dot) ────────────────────────────────────── */

.bcr-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 11px;
	border-radius: 20px;
	font-size: .76em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	line-height: 1.7;
}

.bcr-status::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}

.bcr-status-pending     { background: #fef3c7; color: #92400e; }
.bcr-status-confirmed   { background: #dbeafe; color: #1e40af; }
.bcr-status-active      { background: #dcfce7; color: #166534; }
.bcr-status-cancelled   { background: #fee2e2; color: #991b1b; }
.bcr-status-completed   { background: #eef0f3; color: #4b5563; }
.bcr-status-available   { background: #dcfce7; color: #166534; }
.bcr-status-unavailable { background: #fee2e2; color: #991b1b; }
.bcr-status-maintenance { background: #fef3c7; color: #92400e; }
.bcr-status-inactive    { background: #eef0f3; color: #6b7280; }

/* ── Car duration pricing tiers ────────────────────────────────────── */

.bcr-tier-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 36px;
	gap: 10px;
	align-items: end;
	margin-bottom: 8px;
	padding: 12px 14px;
	background: #fafbfc;
	border: 1px solid #e6e8ec;
	border-radius: 10px;
	transition: border-color .15s, box-shadow .15s;
}

.bcr-tier-row:hover {
	border-color: #d3d7dd;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.bcr-tier-header {
	background: transparent;
	border-color: transparent;
	padding-top: 0;
	padding-bottom: 2px;
	margin-bottom: 2px;
	box-shadow: none !important;
}

.bcr-tier-header span {
	font-size: .72em;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #6b7280;
	font-weight: 700;
}

.bcr-tier-row label {
	font-size: .76em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #6b7280;
	display: block;
	margin-bottom: 4px;
}

.bcr-tier-row input { margin: 0 !important; }
