/**
 * Content templates — 404, site search, single event, archive empty state
 *
 * Stonehenge Child Theme
 * Version: 1.0.0
 *
 * Loaded only on the templates that need it (sc_enqueue_template_styles).
 * The hero, room cards and event-archive styling already live in style.css and
 * are reused, so this file only covers what had no styles at all:
 *   .sc-404-*          (404.php)
 *   .sc-sitesearch-*   (search.php)
 *   .sc-ev-single-*    (single-events.php)
 *   .sc-archive-empty  (archive-mphb_room_type.php)
 *
 * 🔴 .sc-sitesearch-* exists because .sc-search-* is already taken by MPHB's
 *    availability results page (booking bar, filter bar, count row). Reusing
 *    those names would make the two pages fight.
 *
 * Colour tokens come from the theme's own --sc-* set in style.css; literals are
 * only used where no token exists.
 */

/* ============================================================
   Shared link list (404 + empty search)
   ============================================================ */

.sc-404,
.sc-sitesearch { padding: 48px 0; }

/* 🔑 The gutter is var(--sc-gutter), not a hardcoded 20px. At 1280px wide a
   20px gutter puts the content at x100 while the header and footer sit at x112,
   so the 404 link pills and the site-search results were 12px wider than every
   other band on the page. The token also steps to 20px at ≤767px, so mobile is
   unchanged — this only corrects desktop. */
.sc-404-inner,
.sc-sitesearch-inner {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--sc-gutter, 32px);
}

.sc-404-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
}

.sc-404-links a {
    display: block;
    padding: 12px 22px;
    border: 1px solid rgba(34, 83, 34, .25);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: #225322;                 /* brand green */
    background: #fff;
    transition: background .15s ease, border-color .15s ease;
}

.sc-404-links a:hover,
.sc-404-links a:focus-visible {
    background: #225322;
    border-color: #225322;
    color: #fff;
}

.sc-404-search { text-align: center; }

.sc-404-search-label {
    margin: 0 0 12px;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #777;
}

/* WordPress's default search form, made to match */
.sc-404 .search-form,
.sc-sitesearch .search-form {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 auto 32px;
    max-width: 520px;
}

.sc-404 .search-form label,
.sc-sitesearch .search-form label { flex: 1 1 240px; margin: 0; }

.sc-404 .search-field,
.sc-sitesearch .search-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.sc-404 .search-submit,
.sc-sitesearch .search-submit {
    padding: 12px 22px;
    border: 0;
    border-radius: 8px;
    background: #225322;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

/* ============================================================
   Site search results
   ============================================================ */

.sc-sitesearch-results { list-style: none; margin: 0; padding: 0; }

.sc-sitesearch-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    align-items: start;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.sc-sitesearch-item:last-child { border-bottom: 0; }

.sc-sitesearch-thumb img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
}

.sc-sitesearch-type {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.sc-sitesearch-title { margin: 0 0 6px; font-size: 20px; line-height: 1.25; }
.sc-sitesearch-title a { text-decoration: none; color: #225322; }
.sc-sitesearch-title a:hover { text-decoration: underline; }

.sc-sitesearch-excerpt { margin: 0; font-size: 15px; line-height: 1.6; color: #555; }

.sc-sitesearch-empty {
    margin: 0 0 24px;
    text-align: center;
    font-size: 17px;
    color: #555;
}

.sc-sitesearch-pagination { margin-top: 32px; text-align: center; }
.sc-sitesearch-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 2px;
    border-radius: 6px;
    text-decoration: none;
    color: #225322;
}
.sc-sitesearch-pagination .current { background: #225322; color: #fff; }

@media (max-width: 600px) {
    .sc-sitesearch-item { grid-template-columns: 1fr; }
    .sc-sitesearch-thumb img { height: 180px; }
}

/* ============================================================
   Single event
   ============================================================ */

.sc-ev-single-hero {
    position: relative;
    background: #225322;
    color: #fff;
    text-align: center;
}

.sc-ev-single-hero-media { position: absolute; inset: 0; overflow: hidden; }

.sc-ev-single-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .28;      /* the title has to stay readable over the photo */
}

.sc-ev-single-hero-inner {
    position: relative;
    max-width: 860px;
    margin-inline: auto;
    /* clears the fixed 88px site header, same reasoning as page-riat.php */
    padding: 136px 20px 56px;
}

.sc-ev-single-eyebrow {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #e8a020;      /* amber gold */
}

.sc-ev-single-h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.1;
    color: #fff;
}

.sc-ev-single-tagline {
    margin: 0 0 16px;
    font-size: clamp(16px, 2.4vw, 21px);
    font-style: italic;
    color: rgba(255, 255, 255, .9);
}

.sc-ev-single-date {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .85);
}

.sc-ev-single-body {
    max-width: 780px;
    margin-inline: auto;
    padding: 40px 20px 56px;
}

.sc-ev-single-past {
    margin: 0 0 28px;
    padding: 14px 18px;
    border-left: 4px solid #e8a020;
    background: #fdf6e8;
    font-size: 15px;
    color: #6b4e13;
}

.sc-ev-single-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
}

.sc-ev-single-pill {
    padding: 6px 14px;
    border: 1px solid rgba(34, 83, 34, .2);
    border-radius: 999px;
    background: #f3f7f1;
    font-size: 13px;
    font-weight: 600;
    color: #225322;
}

.sc-ev-single-desc { font-size: 17px; line-height: 1.7; color: #333; }
.sc-ev-single-desc p { margin: 0 0 18px; }
.sc-ev-single-desc p:last-child { margin-bottom: 0; }

.sc-ev-single-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0 24px;
}

.sc-ev-single-btn {
    display: inline-block;
    padding: 14px 26px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .03em;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.sc-ev-single-btn--book { background: #e8a020; color: #2b2b2b; }
.sc-ev-single-btn--book:hover { background: #d18f16; color: #2b2b2b; }

.sc-ev-single-btn--info { background: #225322; color: #fff; }
.sc-ev-single-btn--info:hover { background: #1a401a; color: #fff; }

.sc-ev-single-btn--back {
    background: transparent;
    border: 1px solid rgba(34, 83, 34, .3);
    color: #225322;
}
.sc-ev-single-btn--back:hover { background: #f3f7f1; }

.sc-ev-single-stay {
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 15px;
    color: #555;
}
.sc-ev-single-stay a { color: #225322; font-weight: 600; }

/* ============================================================
   Archive empty state
   ============================================================ */

.sc-archive-empty {
    padding: 40px 20px;
    text-align: center;
    color: #777;
}

@media (prefers-reduced-motion: reduce) {
    .sc-404-links a,
    .sc-ev-single-btn { transition: none !important; }
}
