/**
 * EquaRent Pro — front management console scoping sheet.
 *
 * The three console shortcodes render the real wp-admin markup (.wrap.equarent-admin + .notice, .widefat,
 * .button, .regular-text). The EquaRent admin stylesheets are scoped under .equarent-admin and assume the
 * wp-admin base environment (13px body font, forms.css box-sizing + field sizing, common.css notices, a grey
 * canvas behind white cards). On the FRONT that base is absent — so text inherits the theme's larger font,
 * fields overlap for want of box-sizing, and white cards vanish against a white theme page.
 *
 * This sheet re-declares just that base, EVERY rule scoped under .equarent-pro-console (the shortcode
 * wrapper), so the console looks like wp-admin WITHOUT any rule leaking into the host theme. `buttons` and
 * `list-tables` (WP-class-scoped, safe) are enqueued alongside; `common`/`forms` are deliberately NOT, as
 * they would restyle the theme's own controls and content.
 */

/* Typography base (replaces the wp-admin 13px body font the theme otherwise overrides). */
.equarent-pro-console {
	font-size: 13px;
	line-height: 1.4;
	color: #1d2327;
	/* Grey canvas like wp-admin, so the white cards are clearly delimited on a white theme page. */
	background: #f0f0f1;
	padding: 20px;
	border-radius: 12px;
}

/* Box model (replaces forms.css — without this, fields overlap/shift). */
.equarent-pro-console,
.equarent-pro-console *,
.equarent-pro-console *::before,
.equarent-pro-console *::after {
	box-sizing: border-box;
}

/* Neutralise the theme's own .wrap constraints inside the console. */
.equarent-pro-console .wrap {
	margin: 0;
	max-width: none;
}

/* Reinforce the card frame so each section reads as a distinct card on the grey canvas. */
.equarent-pro-console .equarent-card {
	border-color: #dcdfe3;
}

/* Base form controls (forms.css replacement), scoped so the theme's own fields are untouched. */
.equarent-pro-console input,
.equarent-pro-console select,
.equarent-pro-console textarea {
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
	max-width: 100%;
	vertical-align: middle;
}
.equarent-pro-console .regular-text {
	width: 25em;
	max-width: 100%;
}

/* Minimal admin notice styling (common.css replacement). */
.equarent-pro-console .notice {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-left-width: 4px;
	padding: 8px 12px;
	margin: 12px 0;
}
.equarent-pro-console .notice-success {
	border-left-color: #00a32a;
}
.equarent-pro-console .notice-error {
	border-left-color: #d63638;
}

/* Keep headings/paragraphs tight (the theme may inflate their margins) and tables full width. */
.equarent-pro-console h1,
.equarent-pro-console h2,
.equarent-pro-console h3 {
	margin: 0 0 .6em;
	line-height: 1.3;
}
.equarent-pro-console p {
	margin: 0 0 .6em;
}
.equarent-pro-console table {
	width: 100%;
}

/* Buttons inherit the console font (forms.css/common.css are not loaded on the front), so a link-style
   table button like "Delete" is not rendered oversized by the browser/theme default. */
.equarent-pro-console button {
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
}
/* .button-link is a plain link (common.css absent on the front); .delete is destructive red. */
.equarent-pro-console .button-link {
	border: 0;
	background: none;
	box-shadow: none;
	padding: 0;
	height: auto;
	cursor: pointer;
	color: var( --equarent-blue, #2271b1 );
}
.equarent-pro-console .button-link.delete,
.equarent-pro-console .delete {
	color: #b32d2e;
}

/* Subtle table framing (list-tables.css borders are heavier) + a little more breathing room (Reservations). */
.equarent-pro-console .widefat {
	border-color: #e6edf5;
}
.equarent-pro-console .widefat th,
.equarent-pro-console .widefat td {
	border-color: #eef3f8;
	padding: 10px 12px;
	vertical-align: middle;
}
/* The console omits core common.css, so widefat <th> would fall back to the browser default (centered)
   while <td> keep their left/declared alignment — headers misaligned over the data. Left-align just the
   HEADERS to match wp-admin; body cells keep their own alignment (e.g. right-aligned money columns such as
   .equarent-quote__amount). The compact config tables re-center their headers in the rule just below
   (declared after this, so it wins). */
.equarent-pro-console .widefat th {
	text-align: left;
}
.equarent-pro-console .widefat thead th {
	border-bottom-color: #dde6ef;
}
/* Centre the compact config tables (discount tiers / seasons): values, toggles and the delete action. */
.equarent-pro-console .equarent-seasons th,
.equarent-pro-console .equarent-seasons td {
	text-align: center;
}
.equarent-pro-console .equarent-seasons .equarent-switch-wrap {
	justify-content: center;
}

/* The logged-out / access-restricted notice card (shown in place of the console). */
.equarent-pro-console--locked,
.equarent-pro-console--denied {
	max-width: 520px;
	margin: 0 auto;
	text-align: center;
}
/* The notice card's button is hand-built markup with no .wp-core-ui / .equarent-admin ancestor, so neither
   buttons.css (.wp-core-ui .button) nor equarent-admin.css (.equarent-admin .button) styles it. Style it here,
   SCOPED to the notice cards only, so the full console's own buttons are left to the admin stylesheet. */
.equarent-pro-console--locked .button,
.equarent-pro-console--locked .button-primary,
.equarent-pro-console--denied .button,
.equarent-pro-console--denied .button-primary {
	display: inline-block;
	box-sizing: border-box;
	min-height: 32px;
	margin: 0;
	padding: 4px 14px;
	font-size: 13px;
	line-height: 1.6;
	text-decoration: none;
	border: 1px solid #2271b1;
	border-radius: 3px;
	cursor: pointer;
}
.equarent-pro-console--locked .button-primary,
.equarent-pro-console--denied .button-primary {
	color: #fff;
	background: #2271b1;
}
.equarent-pro-console--locked .button-primary:hover,
.equarent-pro-console--denied .button-primary:hover {
	background: #135e96;
	border-color: #135e96;
}

/* -------------------------------------------------------------------------------------------------
 * Unified single-page console: [equarent_admin slug="…"] renders a centered view menu + the active
 * view. The menu sits OUTSIDE .equarent-pro-console (it is page-level chrome), so it carries its own
 * explicit typography; the property selector sits INSIDE a scoped view and inherits the base above.
 * ----------------------------------------------------------------------------------------------- */
.equarent-pro-console-shell {
	margin: 0;
}

/* Centered horizontal view menu (the console tabs). */
.equarent-pro-console-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 8px;
	margin: 0 0 16px;
	padding: 6px;
	border-radius: 12px;
	background: #f0f0f1;
	box-sizing: border-box;
}
.equarent-pro-console-menu__item {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #1d2327;
	text-decoration: none;
	border: 1px solid transparent;
}
.equarent-pro-console-menu__item:hover,
.equarent-pro-console-menu__item:focus {
	background: #e2e6ea;
	color: #1d2327;
}
.equarent-pro-console-menu__item.is-active {
	background: #fff;
	border-color: #dcdfe3;
	color: var( --equarent-blue, #2271b1 );
	box-shadow: 0 1px 2px rgba( 0, 0, 0, .06 );
}

/* Per-property scope selector (pills) inside a scoped console view (multi-property sites only). */
.equarent-pro-console .equarent-pro-console-props {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
}
.equarent-pro-console .equarent-pro-console-props__item {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	color: #52708a;
	text-decoration: none;
	background: #fff;
	border: 1px solid #dcdfe3;
}
.equarent-pro-console .equarent-pro-console-props__item:hover {
	border-color: #2271b1;
	color: #2271b1;
}
.equarent-pro-console .equarent-pro-console-props__item.is-active {
	color: #fff;
	background: var( --equarent-blue, #2271b1 );
	border-color: var( --equarent-blue, #2271b1 );
}
