/**
 * power-search.css
 * ----------------
 * Scoped styles for the PowerSearch autocomplete dropdown.
 * All selectors are namespaced under .ps-* so they cannot bleed into
 * the rest of the Bootstrap + custom.css stack.
 *
 * Brand colours mirror ChefOnline's identity:
 *   Primary red  : #ED1A3B
 *   Hover red    : #DA092A
 *   Light red    : #E64D64
 */

/* =======================================================================
   Hero Section
   ======================================================================= */

.ps-hero {
    background-image: url(../img/details-bg.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 115px 0 0 0;
    position: relative;
}

.ps-hero__overlay {
    background: rgba(0, 0, 0, 0.6) none repeat scroll 0 0;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1;
}

.ps-hero .container {
    position: relative;
    z-index: 2;
}

.ps-hero__inner {
    padding-bottom: 40px;
}

.ps-hero__tagline li {
    color: #fff;
    font-size: 25px;
    margin-bottom: 30px;
    font-weight: 500;
}

.ps-hero__subtext {
    color: #fff;
    font-size: 15px;
    margin-bottom: 25px;
}

.ps-hero__fields li {
    margin-bottom: 10px;
}

.ps-hero__input {
    border-radius: 0 !important;
}

.ps-hero__submit {
    display: block;
    border-radius: 0 !important;
    width: 100%;
    text-transform: uppercase;
    font-size: 13px !important;
}

@media screen and (max-width: 767px) {
    .ps-hero__tagline li {
        font-size: 15px;
    }
    .ps-hero__input {
        margin-bottom: -10px !important;
    }
}

/* -----------------------------------------------------------------------
   Wrapper — establishes the positioning context for the dropdown
   ----------------------------------------------------------------------- */
.ps-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* -----------------------------------------------------------------------
   Dropdown list
   ----------------------------------------------------------------------- */
.ps-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 9999;

    list-style: none;
    margin: 0;
    padding: 4px 0;

    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);

    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;

    /* Smooth appearance */
    animation: ps-fade-in 0.12s ease-out;
}

@keyframes ps-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------------------------------
   Individual suggestion item
   ----------------------------------------------------------------------- */
.ps-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.1s ease;
}

.ps-item:last-child {
    border-bottom: none;
}

.ps-item:hover,
.ps-item--active {
    background-color: #fdf2f4;  /* very light brand tint */
}

/* Focus ring for keyboard nav */
.ps-item--active {
    outline: 2px solid #ED1A3B;
    outline-offset: -2px;
}

/* -----------------------------------------------------------------------
   Icon column
   ----------------------------------------------------------------------- */
.ps-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

/* -----------------------------------------------------------------------
   Label — main text
   ----------------------------------------------------------------------- */
.ps-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -----------------------------------------------------------------------
   Meta — secondary text (e.g. town name under a restaurant)
   ----------------------------------------------------------------------- */
.ps-meta {
    font-size: 12px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* -----------------------------------------------------------------------
   Badge — type pill (Postcode / Area / Restaurant / Cuisine)
   ----------------------------------------------------------------------- */
.ps-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 20px;
    background-color: #ED1A3B;
    color: #ffffff;
}

/* -----------------------------------------------------------------------
   Scrollbar styling (WebKit only; falls back gracefully)
   ----------------------------------------------------------------------- */
.ps-dropdown::-webkit-scrollbar {
    width: 5px;
}
.ps-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.ps-dropdown::-webkit-scrollbar-thumb {
    background: #E64D64;
    border-radius: 4px;
}

/* =======================================================================
   Results panel — AJAX full-search output rendered below the hero
   ======================================================================= */

.ps-results {
    margin-top: 0;
    animation: ps-fade-in 0.18s ease-out;
}

.ps-results__inner {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ── Header row ── */
.ps-results__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: linear-gradient(90deg, #ED1A3B 0%, #E64D64 100%);
    color: #ffffff;
}

.ps-results__count {
    font-size: 14px;
    font-weight: 500;
}

.ps-results__count strong {
    font-weight: 700;
}

.ps-results__close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.ps-results__close:hover {
    opacity: 1;
}

/* ── Group sections ── */
.ps-results__group {
    padding: 12px 18px 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ps-results__group:last-child {
    border-bottom: none;
}

.ps-results__group-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ED1A3B;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ps-results__group-icon {
    font-size: 14px;
}

/* ── Result list ── */
.ps-results__list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
}

.ps-results__item {
    border-radius: 6px;
    overflow: hidden;
}

.ps-results__link {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #1a1a1a;
    transition: background-color 0.12s ease, color 0.12s ease;
    border: 1px solid transparent;
}

.ps-results__link:hover,
.ps-results__link:focus {
    background-color: #fdf2f4;
    border-color: rgba(237, 26, 59, 0.2);
    color: #ED1A3B;
    text-decoration: none;
}

.ps-results__item-label {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-results__item-meta {
    font-size: 11px;
    color: #888;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-results__link:hover .ps-results__item-meta,
.ps-results__link:focus .ps-results__item-meta {
    color: #c0405a;
}

/* ── Empty / no-results state ── */
.ps-results__empty {
    padding: 24px;
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.ps-results__empty p {
    margin: 0 0 6px;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .ps-results__list {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------------------
   No-JS / noscript fallback
   ----------------------------------------------------------------------- */
.ps-hero__submit span[v-show="loading"]  { display: none; }
.ps-hero__submit span[v-show="!loading"] { display: inline; }
.ps-vue-app [v-cloak]                    { display: none !important; }


