/* ==========================================================================
   UPG plugin layer: Contact Form 7, The Events Calendar / Event Tickets, WooCommerce
   (hall hire, cart, checkout), booking extensions, Elementor Free, AIOSEO, maps, prose.
   Built only from tokens.css. Loaded after main.css.
   ========================================================================== */

/* --- Small additions the WordPress build needs --------------------------- */
a.icon-btn { display: inline-grid; place-items: center; text-decoration: none; color: inherit; }
.entry-content > * + * { margin-top: var(--space-4); }
.entry-content h2 { margin-top: var(--space-6); }
.entry-content h3 { margin-top: var(--space-5); }
.entry-content ul, .entry-content ol { padding-left: 1.25rem; }
.entry-content img, .entry-content iframe { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: var(--space-2) var(--space-3); text-align: left; }
.entry-content .alignwide { max-width: none; }
.entry-content blockquote { border-left: 6px solid var(--brand-primary); margin-left: 0; padding-left: var(--space-4); }
.wp-block-image figcaption, .wp-caption-text { font-size: var(--text-xs); color: var(--ink-muted); }
.services .entry-content { margin: 0; }
.services .entry-content > * + * { margin-top: 0; }
.event-notice { background: var(--surface-alt); border-left: 4px solid var(--brand-primary); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-sm); margin: var(--space-2) 0; }
.detail-main .event-notice { margin: var(--space-4) 0; }
.room-actions { display: inline-flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.room-price { flex-wrap: wrap; gap: var(--space-2); }
.pagination, .nav-links { display: flex; gap: var(--space-2); justify-content: center; margin-top: var(--space-6); flex-wrap: wrap; }
.page-numbers { min-width: var(--tap-target); min-height: var(--tap-target); display: inline-grid; place-items: center; border: 2px solid var(--line); border-radius: var(--radius-pill); padding: 0 var(--space-3); text-decoration: none; font-weight: var(--weight-bold); }
.page-numbers.current { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-fallback { max-width: 40rem; }
[hidden] { display: none !important; }

/* --- Contact Form 7 ------------------------------------------------------- */
.wpcf7 form { margin: 0; }
.wpcf7-form-control-wrap { display: block; }
.wpcf7 .upg-hp-wrap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wpcf7 .wpcf7-form-control.input, .wpcf7 .wpcf7-form-control.select { width: 100%; }
.wpcf7 .wpcf7-checkbox, .wpcf7 .wpcf7-radio { display: contents; }
.wpcf7 .wpcf7-list-item { margin: 0; display: block; }
.wpcf7 .wpcf7-list-item > label {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--tap-target); padding: 0 var(--space-4);
  border: 2px solid var(--line); border-radius: var(--radius-pill);
  font-weight: var(--weight-semibold); font-size: var(--text-sm); cursor: pointer;
}
.wpcf7 .wpcf7-list-item input { width: 20px; height: 20px; accent-color: var(--brand-primary); margin: 0; }
.wpcf7 .wpcf7-list-item > label:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-primary-tint); }
.wpcf7 .check-grid .wpcf7-list-item > label { border-radius: var(--radius-md); display: flex; width: 100%; }
.wpcf7 .field .wpcf7-list-item > label { justify-self: start; }
.wpcf7-not-valid { border-color: var(--brand-primary) !important; }
.wpcf7-not-valid-tip { color: var(--brand-primary-dark); font-size: var(--text-sm); font-weight: var(--weight-bold); margin-top: var(--space-1); display: block; }
.wpcf7 form .wpcf7-response-output { margin: var(--space-4) 0 0; border: 0; border-left: 6px solid var(--brand-primary); background: var(--brand-primary-tint); padding: var(--space-4); border-radius: var(--radius-md); }
.wpcf7 form.init .wpcf7-response-output, .wpcf7 form.resetting .wpcf7-response-output { display: none; }
.wpcf7 form.sent .wpcf7-response-output { border-left-color: var(--ink); font-weight: var(--weight-semibold); }
.wpcf7-spinner { margin: 0 var(--space-3); }
.wpcf7 input[type="submit"].btn { cursor: pointer; border: 0; font: inherit; font-weight: var(--weight-bold); }
.wpcf7 input[type="submit"].btn--primary { background: var(--brand-primary); color: #fff; }
.wpcf7 input[type="submit"].btn--primary:hover { background: var(--brand-primary-dark); }
/* newsletter */
.newsletter .wpcf7 form { display: flex; gap: var(--space-2); margin-top: var(--space-4); flex-wrap: wrap; }
.newsletter .wpcf7 .wpcf7-form-control-wrap { flex: 1; min-width: 12rem; }
.newsletter .wpcf7 .wpcf7-response-output { flex-basis: 100%; text-align: left; }
@media (max-width: 520px) { .newsletter .wpcf7 form { flex-direction: column; } }
.newsletter .wpcf7 form > p { display: contents; }

/* --- The Events Calendar and Event Tickets (plugin-rendered parts) ------- */
.tribe-common { --tec-color-accent-primary: var(--brand-primary); --tec-color-accent-primary-hover: var(--brand-primary-dark); --tec-font-family-base: var(--font-body); }
.tribe-common .tribe-common-c-btn,
.tribe-tickets__tickets-submit-btn, .tribe-tickets__rsvp-actions-button-wrap button,
.tribe-common-c-btn-border-small, .tribe-tickets__rsvp-form-button {
  min-height: var(--tap-target); border-radius: var(--radius-pill); font-family: var(--font-body);
  font-weight: var(--weight-bold); background: var(--brand-primary); border-color: var(--brand-primary); color: #fff;
}
.tribe-common .tribe-common-c-btn:hover, .tribe-tickets__tickets-submit-btn:hover { background: var(--brand-primary-dark); border-color: var(--brand-primary-dark); }
.tribe-tickets__tickets-wrapper, .tribe-tickets__rsvp-wrapper, .tribe-block__tickets__item { max-width: 100%; margin: var(--space-4) 0; font-family: var(--font-body); }
.tribe-tickets__tickets-item, .tribe-tickets__rsvp { border-radius: var(--radius-lg); border: 1px solid var(--line); }
.tribe-events-view, #tribe-events-pg-template { max-width: var(--container); margin: 0 auto; padding: var(--space-6) var(--gutter); font-family: var(--font-body); }
.tribe-events-view .tribe-events-c-top-bar__nav-list-item a:focus-visible, .tribe-tickets__tickets-wrapper :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.register .tribe-tickets__tickets-wrapper { margin-top: var(--space-4); }

/* --- WooCommerce: hall pages, cart, checkout, orders --------------------- */
.woo-main { padding: var(--space-5) 0 var(--space-8); }
.woo-container { max-width: var(--container); }
.woocommerce .woocommerce-breadcrumb { display: none; }
.woocommerce div.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-6); align-items: start; margin-top: var(--space-4); }
.woocommerce div.product div.images { float: none; width: 100%; margin: 0; border-radius: var(--radius-lg); overflow: hidden; }
.woocommerce div.product div.summary { float: none; width: 100%; margin: 0; }
.woocommerce div.product .woocommerce-tabs, .woocommerce div.product .hall-enquire, .woocommerce div.product .related { grid-column: 1 / -1; }
.woocommerce div.product .product_title { font-family: var(--font-display); text-transform: uppercase; font-size: var(--text-2xl); line-height: var(--leading-tight); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ink); font-weight: var(--weight-bold); font-size: var(--text-xl); }
.woocommerce .hall-details { margin: var(--space-4) 0; padding: var(--space-4); background: var(--surface-alt); border-radius: var(--radius-lg); }
.woocommerce .hall-details .facts { margin: 0 0 var(--space-3); }
.woocommerce .hall-enquire { margin-top: var(--space-5); }
.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .wc-block-components-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap-target);
  padding: 0 var(--space-5); border-radius: var(--radius-pill); border: 2px solid var(--brand-primary);
  background: var(--brand-primary); color: #fff; font: inherit; font-weight: var(--weight-bold); text-decoration: none; cursor: pointer;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover { background: var(--brand-primary-dark); border-color: var(--brand-primary-dark); color: #fff; }
.woocommerce button.button:disabled, .woocommerce button.button.disabled { opacity: .5; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text, .select2-container--default .select2-selection--single {
  width: 100%; min-height: var(--tap-target); border: 2px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4); font: inherit; background: var(--surface);
}
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { border-color: var(--brand-primary); outline: none; box-shadow: 0 0 0 3px var(--brand-primary-tint); }
.woocommerce form .form-row label { font-size: var(--text-sm); font-weight: var(--weight-bold); }
.woocommerce form .form-row .required { color: var(--brand-primary); }
.woocommerce .quantity .qty { min-height: var(--tap-target); border: 2px solid var(--line); border-radius: var(--radius-md); }
.woocommerce table.shop_table { border: 1px solid var(--line); border-radius: var(--radius-lg); border-collapse: separate; overflow: hidden; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-color: var(--line); padding: var(--space-3) var(--space-4); }
.woocommerce-info, .woocommerce-message, .woocommerce-error {
  background: var(--brand-primary-tint); border: 0; border-left: 6px solid var(--brand-primary); border-radius: var(--radius-md);
  color: var(--ink); padding: var(--space-4) var(--space-4) var(--space-4) var(--space-6);
}
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { color: var(--brand-primary); }
.woocommerce-error { list-style: none; }
.woocommerce-checkout #payment { background: var(--surface-alt); border-radius: var(--radius-lg); }
.woocommerce-checkout #payment div.payment_box { background: var(--surface); color: var(--ink); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--surface); }
.woocommerce ul.order_details li { border-color: var(--line); }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.woocommerce-MyAccount-navigation a { display: inline-flex; min-height: var(--tap-target); align-items: center; padding: 0 var(--space-4); border: 2px solid var(--line); border-radius: var(--radius-pill); text-decoration: none; font-weight: var(--weight-semibold); }
.woocommerce-MyAccount-navigation .is-active a { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.woocommerce-cart .cart_totals, .woocommerce-checkout .woocommerce-checkout-review-order { margin-top: var(--space-4); }
@media (max-width: 860px) { .woocommerce div.product { grid-template-columns: 1fr; } }

/* Booking extensions: date picker and time slots (jQuery UI datepicker is what most free extensions use) */
.ui-datepicker { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); font-family: var(--font-body); padding: var(--space-3); z-index: 80 !important; }
.ui-datepicker .ui-datepicker-header { background: none; border: 0; font-weight: var(--weight-bold); }
.ui-datepicker td a, .ui-datepicker td span { min-width: 36px; min-height: 36px; display: inline-grid; place-items: center; border-radius: var(--radius-pill); text-align: center; border: 0; background: none; }
.ui-datepicker td a:hover, .ui-datepicker td a.ui-state-active { background: var(--brand-primary); color: #fff; }
.ui-datepicker td.ui-state-disabled span { color: #9a9a9a; text-decoration: line-through; }
.has-booking-plugin form.cart { margin-top: var(--space-4); padding: var(--space-4); border: 2px solid var(--line); border-radius: var(--radius-lg); }
.has-booking-plugin form.cart select, .has-booking-plugin form.cart input[type="text"], .has-booking-plugin form.cart input[type="date"] { min-height: var(--tap-target); border: 2px solid var(--line); border-radius: var(--radius-md); padding: 0 var(--space-3); font: inherit; max-width: 100%; }
.has-booking-plugin form.cart label { font-weight: var(--weight-bold); font-size: var(--text-sm); display: block; margin: var(--space-3) 0 var(--space-1); }
.has-booking-plugin form.cart .button:focus-visible, .has-booking-plugin form.cart :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- Maps ----------------------------------------------------------------- */
.centre-map--live { position: relative; min-height: 420px; padding: 0; z-index: 0; }
.centre-map--live .pin--leaflet { background: none; border: 0; display: grid; place-items: start center; }
.centre-map--live .pin-dot { position: static; }
.map--embed { padding: 0; min-height: 300px; overflow: hidden; }
.map--embed iframe { width: 100%; height: 100%; min-height: 300px; border: 0; display: block; }
.map-alt { margin: var(--space-2) 0 var(--space-4); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-container a { color: var(--brand-primary); }

/* --- Elementor Free: neutralise Elementor's own spacing around UPG blocks - */
.elementor-widget-html > .elementor-widget-container { margin: 0; padding: 0; }
.upg-el-block, .upg-el-block > .elementor-widget-html { --gap: 0px; --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px; --margin-top: 0px; --margin-bottom: 0px; --widgets-spacing: 0px; --widgets-spacing-row: 0px; --widgets-spacing-column: 0px; }
.upg-el-block.e-con { padding: 0; margin: 0; max-width: none; --content-width: 100%; }
.upg-el-block.e-con > .e-con-inner { padding: 0; max-width: none; }
.elementor-page .site-header, .elementor-editor-active .site-header { position: relative; }
.elementor-page main#main { display: block; }
.elementor-element.upg-el-block .container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* --- AIOSEO (breadcrumb widget, if used inside the content) --------------- */
.aioseo-breadcrumbs { font-size: var(--text-sm); color: var(--ink-muted); }
.aioseo-breadcrumbs a { color: var(--ink); }
