/**
 * HireHub frontend structure. The visual skin comes from the site's UIkit
 * theme (YOOtheme Pro) via uk-* classes in the templates; this file only
 * provides layout, spacing and the few pieces UIkit has no component for.
 * On a non-UIkit template it degrades to a clean unstyled-but-usable layout.
 */

.hirehub { line-height: 1.55; }
.hirehub .hirehub-h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.hirehub-empty { padding: 1.5rem 0; }
.hirehub-breadcrumb { margin-bottom: 1rem; font-size: .9rem; }
.hirehub-btn-block { width: 100%; text-align: center; }
.hirehub .is-disabled { opacity: .5; pointer-events: none; }

/* Status labels UIkit lacks (uk-label-success/warning/danger exist) */
.hirehub .hirehub-label-info { background: #91c3e8; color: #0b3a5c; }
.hirehub .hirehub-label-muted { background: #e5e8eb; color: #4a555f; }
.hirehub .uk-label + .uk-label { margin-left: .3rem; }

/* Catalogue layout */
.hirehub-location-pills { margin: 0 0 1rem; }
.hirehub-layout { display: grid; grid-template-columns: 250px 1fr; gap: 1.75rem; align-items: start; }
@media (max-width: 860px) { .hirehub-layout { grid-template-columns: 1fr; } }

/* z-index lifts the whole sticky sidebar above the results grid so open
   calendar popovers are never painted behind the item cards. */
.hirehub-filters { position: sticky; top: 1rem; z-index: 10; }

/* Mobile: the sidebar sits in the normal flow (no stick - items must not
   scroll behind it) and the filter sections (categories, availability
   search) fold behind toggles. Desktop always shows them expanded. */
.hirehub-fold-toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .55rem .8rem;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 6px;
    background: transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.hirehub-fold-toggle::after { content: "▾"; }
.hirehub-fold.is-open .hirehub-fold-toggle::after { content: "▴"; }

@media (max-width: 860px) {
    .hirehub-filters { position: static; }
    .hirehub-fold-toggle { display: flex; }
    .hirehub-fold .hirehub-fold-label { display: none; }
    .hirehub-fold .hirehub-fold-body { display: none; margin-top: .6rem; }
    .hirehub-fold.is-open .hirehub-fold-body { display: block; }
}
.hirehub-filter-block { margin-bottom: 1.4rem; }
.hirehub-filter-label { display: block; font-weight: 700; margin-bottom: .4rem; }
.hirehub-sub-label { display: block; font-size: .8rem; opacity: .7; margin: .4rem 0 .15rem; }
.hirehub-search-row { display: flex; gap: .4rem; }
.hirehub-search-row input { flex: 1; min-width: 0; }
.hirehub-filter-actions { margin-top: .5rem; display: flex; gap: .6rem; align-items: center; }
.hirehub-time-field { margin-top: .15rem; }
.hirehub-times-note { margin: .3rem 0 0; }
.hirehub-filters .hirehub-cal-pop { width: min(19rem, 92vw); }
.hirehub-clear { font-size: .85rem; }

.hirehub-category-list { margin: 0; padding: 0; }
.hirehub-category-list li { padding-left: calc(var(--level, 0) * .9rem); }
.hirehub-category-list a { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.hirehub-count { flex: none; }

/* Category filter checkboxes (tick to add, auto-applies) */
.hirehub-category-checks { list-style: none; margin: 0 0 .6rem; padding: 0; }
.hirehub-category-checks li { padding-left: calc(var(--level, 0) * .9rem); }
.hirehub-cat-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .22rem 0;
    cursor: pointer;
}
.hirehub-cat-check input { flex: none; margin: 0; }
.hirehub-cat-check .hirehub-cat-title { flex: 1 1 auto; }

/* Results */
.hirehub-results-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 1rem;
    align-items: center;
    margin-bottom: .75rem;
}
.hirehub-sort { margin: 0; }

.hirehub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
}
.hirehub-card { display: flex; flex-direction: column; overflow: hidden; }
.hirehub-card-media { display: block; aspect-ratio: 4 / 3; background: rgba(0, 0, 0, .04); }
.hirehub-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hirehub-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5rem;
    opacity: .4;
}
.hirehub-card-body { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.hirehub-card-title { font-size: 1.05rem; margin: 0; }
.hirehub-card-title a { text-decoration: none; color: inherit; }
.hirehub-card-cats, .hirehub-card-intro { margin: 0; }
.hirehub-card-intro { flex: 1; }
.hirehub-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    /* auto pins the View & Book row to the card's bottom edge whatever the
       card's height, so buttons line up across the whole grid row. */
    margin-top: auto;
    padding-top: .5rem;
}

/* Higher-specificity restatement of the flex chain: the theme's compiled
   UIkit loads in unpredictable order relative to this file, and a
   same-specificity .uk-card / .uk-card-body rule landing later would
   unpin the View & Book row. These win regardless of load order. */
.hirehub .hirehub-grid .hirehub-card {
    display: flex;
    flex-direction: column;
}
.hirehub .hirehub-grid .hirehub-card .hirehub-card-media { flex: none; }
.hirehub .hirehub-grid .hirehub-card .hirehub-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.hirehub .hirehub-grid .hirehub-card .hirehub-card-footer { margin-top: auto; }

/* Hard 4:3 clamp on the card photo. aspect-ratio alone is only a
   *preferred* size - a portrait image in flow can stretch the box and
   break the whole row. Absolutely positioning the image means the box is
   always exactly 4:3 and the photo centre-crops into it. */
.hirehub .hirehub-grid .hirehub-card .hirehub-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.hirehub .hirehub-grid .hirehub-card .hirehub-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hirehub-price { font-weight: 700; white-space: nowrap; }
.hirehub-availability { margin: 0; font-weight: 600; }
.hirehub-availability.is-available { color: #217a4b; }
.hirehub-availability.is-unavailable { color: #b3352a; }
.hirehub-pagination { margin-top: 1.5rem; }

/* Item page. The title is a direct grid child: top of the right-hand
   column on desktop, above the image on mobile. */
.hirehub-item-layout {
    display: grid;
    grid-template-columns: minmax(280px, 5fr) 6fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "media title"
        "media info";
    column-gap: 2rem;
    align-items: start;
}
.hirehub-item-layout > .hirehub-item-title { grid-area: title; }
.hirehub-item-media { grid-area: media; }
.hirehub-item-info { grid-area: info; }
@media (max-width: 860px) {
    .hirehub-item-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "title"
            "media"
            "info";
    }
    .hirehub-item-media { margin-bottom: 1rem; }
}
.hirehub-item-main-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: rgba(0, 0, 0, .04);
}
.hirehub-item-gallery { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.hirehub-item-gallery img { width: 84px; height: 64px; object-fit: cover; }
.hirehub-item-description { margin-top: 1.25rem; }
.hirehub-item-title { margin: 0 0 .4rem; color: #000; }

/* Headings stay readable on themes that colour headings white for hero
   sections. Elements carrying a uk-text-* utility (e.g. the secondary-
   coloured card titles) keep their own colour. */
.hirehub :is(h1, h2, h3, h4):not([class*="uk-text-"]),
.hirehub .uk-legend {
    color: #000;
}
.hirehub .hirehub-h2 { color: #000; }

/* Page heading (menu item title) + basket shortcut row */
.hirehub-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.hirehub-page-title { margin: 0; color: #000; font-weight: 700; }
.hirehub-basket-btn { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.hirehub-basket-btn svg { flex: none; }
.hirehub-item-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.hirehub-item-price { font-size: 1.35rem; margin: .6rem 0; }
.hirehub-tax-note { display: block; }
.hirehub-tier-table { width: auto; margin: 0 0 1rem; }
.hirehub-tier-table caption { caption-side: top; text-align: left; font-weight: 700; font-size: .85rem; padding-bottom: .3rem; }

/* Booking + forms */
.hirehub-booking { margin-top: 1rem; }
.hirehub-field { margin-bottom: .8rem; }
.hirehub-field-row { display: grid; grid-template-columns: 3fr 2fr; gap: .75rem; }
.hirehub-field-qty { max-width: 8rem; }
.hirehub-field-postcode { max-width: 12rem; }
.hirehub-notice-note { margin: .2rem 0 .8rem; }
.hirehub-period-locked p { margin: 0 0 .3rem; }

.hirehub-addons { margin: 0 0 .9rem; }
.hirehub-addon { display: flex; gap: .5rem; align-items: baseline; padding: .25rem 0; cursor: pointer; }
.hirehub-addon-title { flex: 1; }
.hirehub-addon-price { white-space: nowrap; }

.hirehub-estimate { font-weight: 700; margin: .3rem 0 .8rem; }
.hirehub-item-description, .hirehub-related { margin-top: 2rem; }

/* Tables */
.hirehub-num { text-align: right; white-space: nowrap; }
/* High-specificity guard: money columns stay right-aligned even when the
   theme sets a default td text-align. */
.hirehub table td.hirehub-num,
.hirehub table th.hirehub-num { text-align: right !important; }
.hirehub-qty-input { width: 4.5rem; }
.hirehub-remove { font-size: 1.2rem; text-decoration: none; color: #b3352a; padding: 0 .4rem; }
@media (max-width: 640px) { .hirehub-hide-sm { display: none; } }

/* Basket */
.hirehub-cart-period { margin-bottom: 1.25rem; position: relative; z-index: 10; }
.hirehub-period-line { margin: 0 0 .5rem; }
.hirehub-period-edit summary {
    cursor: pointer;
    font-size: .9rem;
    text-decoration: underline;
    opacity: .8;
    width: fit-content;
}
.hirehub-period-edit[open] summary { margin-bottom: .8rem; }
.hirehub-period-edit .hirehub-period-summary { margin-top: .6rem; }
.hirehub-period-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.hirehub-period-form .hirehub-field { margin: 0; min-width: 9.5rem; flex: 1; }
.hirehub-period-summary { margin: .6rem 0 0; }
.hirehub-cart-lines-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.hirehub-cart-bottom {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 340px);
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: start;
}
@media (max-width: 720px) { .hirehub-cart-bottom { grid-template-columns: 1fr; } }
.hirehub-coupon-form label { display: block; margin-bottom: .3rem; }
.hirehub-coupon-error { margin: .4rem 0 0; }

.hirehub-totals dl,
.hirehub-totals-list { display: grid; grid-template-columns: 1fr auto; gap: 0 .75rem; margin: 0 0 1rem; }
.hirehub-totals dd,
.hirehub-totals-list dd { margin: 0; text-align: right; }
/* Receipt-style totals TABLE: inherits the theme's own uk-table cell padding,
   so amounts line up exactly with the items table's Line Total column. */
.hirehub-totals-table {
    width: auto;
    min-width: min(24rem, 100%);
    margin: 0 0 0 auto;
    border-top: 2px solid rgba(128, 128, 128, .45);
}
.hirehub-totals-table td { border-bottom: 1px solid rgba(128, 128, 128, .25); }
.hirehub-totals-table .hirehub-grand-row td {
    border-top: 2px solid rgba(128, 128, 128, .45);
    border-bottom: 0;
    font-weight: 800;
    font-size: 1.05em;
}
.hirehub-totals-table .hirehub-tax-line td { opacity: .75; font-size: .92em; }

/* Item specifications */
.hirehub-specs { max-width: 30rem; margin: 0 0 1rem; }
.hirehub-specs caption { caption-side: top; text-align: left; padding-bottom: .3rem; }
.hirehub-spec-label { font-weight: 700; width: 45%; }

/* Receipt-style: right-aligned block matching the items table edge, ruled rows. */
.hirehub-panel .hirehub-totals-list {
    width: 100%;
    max-width: 24rem;
    margin-left: auto;
    border-top: 2px solid rgba(0, 0, 0, .18);
    padding-top: .2rem;
}
.hirehub-totals-list dt,
.hirehub-totals-list dd { padding: .35rem 0; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.hirehub-tax-line { opacity: .75; font-size: .9em; }
.hirehub-grand { font-weight: 800; font-size: 1.1em; border-top: 2px solid rgba(0, 0, 0, .2) !important; border-bottom: 0 !important; padding-top: .5rem; }
.hirehub-continue { display: block; text-align: center; margin-top: .6rem; font-size: .9rem; }

/* Checkout */
.hirehub-checkout-layout { display: grid; grid-template-columns: 3fr 2fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .hirehub-checkout-layout { grid-template-columns: 1fr; } }
.hirehub-checkout-form section { margin-bottom: 1.6rem; }
.hirehub-method {
    display: block;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 6px;
    padding: .7rem .9rem;
    margin-bottom: .5rem;
    cursor: pointer;
}
.hirehub-method:has(input:checked) { border-color: currentColor; }
.hirehub-method-title { font-weight: 700; margin-left: .35rem; }
.hirehub-method-desc { display: block; margin: .35rem 0 0 1.6rem; }
.hirehub-checkout-note { margin-top: .6rem; }
.hirehub-summary { position: sticky; top: 1rem; }
.hirehub-summary-period { font-size: .95rem; }

/* Segmented journal-code boxes (one per format group, separators drawn) */
.hirehub-journal-parts { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.hirehub .hirehub-journal-parts .hh-journal-part {
    width: calc(var(--hh-chars, 4) * 1.05ch + 1.9rem);
    flex: 0 0 auto;
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hirehub-journal-sep { font-weight: 700; opacity: .6; user-select: none; }

/* Date display field + calendar popover */
.hirehub-field { position: relative; }
.hirehub-date-display { cursor: pointer; }
.hirehub-cal-pop {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1020; /* UIkit dropdown level - above cards, badges, sticky bits */
    margin-top: .25rem;
    width: min(20rem, 92vw);
    box-shadow: 0 10px 28px rgba(20, 30, 40, .22);
}

/* The booking column hosts popovers too - keep it above the description /
   related-items sections that follow it in the page. */
.hirehub-item-info { position: relative; z-index: 10; }
.hirehub-cal-pop[hidden] { display: none; }

/* Availability calendar widget */
.hirehub-cal-widget {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 8px;
    padding: .5rem;
    max-width: 20rem;
    background: #fff;
}
.hirehub-calw-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .35rem;
}
.hirehub-calw-label { font-weight: 700; font-size: .9rem; }
.hirehub-calw-nav {
    border: 0;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    padding: .15rem .55rem;
    cursor: pointer;
    border-radius: 6px;
}
.hirehub-calw-nav:hover { background: rgba(0, 0, 0, .06); }
.hirehub-calw-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.hirehub-calw-dow {
    text-align: center;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    opacity: .6;
    padding: .15rem 0;
}
.hirehub-calw-day {
    border: 0;
    background: transparent;
    padding: .3rem 0;
    text-align: center;
    font-size: .85rem;
    border-radius: 6px;
    cursor: pointer;
    min-width: 2rem;
}
.hirehub-calw-day:not(:disabled):hover { background: rgba(0, 0, 0, .08); }
.hirehub-calw-day:disabled {
    opacity: .3;
    cursor: not-allowed;
    text-decoration: line-through;
}
.hirehub-calw-day.is-selected {
    background: #1a5f9e;
    color: #fff;
    font-weight: 700;
}
.hirehub-option-cell { padding-left: 1.4rem !important; }
.hirehub-option-row td { border-top: 0; font-size: .92em; }

/* Honeypot: visually gone, present for bots */
.hirehub-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Terms + module extras */
.hirehub-terms { margin: 1rem 0; }
.hirehub-terms label { cursor: pointer; }
.hirehub-module-more { margin-top: 1rem; text-align: center; }

/* Confirmation + order detail */
.hirehub-confirm-head { padding: 1.5rem 0 1rem; }
.hirehub-confirm-tick {
    display: inline-flex;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: #2c9963;
    color: #fff;
    font-size: 1.7rem;
    align-items: center;
    justify-content: center;
    margin-bottom: .6rem;
}
.hirehub-confirm-tick.is-cancelled { background: #cf4436; }
.hirehub-confirm-number { font-size: 1.1rem; }
.hirehub-status-panel { max-width: 620px; margin-left: auto; margin-right: auto; }
.hirehub-status-total { margin: .3rem 0 0; }
.hirehub-status-url a { word-break: break-all; font-size: .9rem; }
.hirehub-confirm-note { max-width: 560px; margin: .5rem auto 0; }
.hirehub-confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 1.25rem 0; }
@media (max-width: 720px) { .hirehub-confirm-grid { grid-template-columns: 1fr; } }
.hirehub-panel { margin-bottom: 1.25rem; }
.hirehub-kv { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: 0; }
.hirehub-kv dt { font-weight: 700; }
.hirehub-kv dd { margin: 0; }
.hirehub-instructions { background: rgba(0, 0, 0, .04); border-radius: 6px; padding: .7rem .9rem; font-size: .92rem; }
.hirehub-confirm-actions { margin: 1.5rem 0; }
