/*
 * Styles for the landing-page widgets (super-search + live notifications feed)
 * when rendered by Django (landing.dtl) instead of Vue. Ports scoped styles
 * from frontend/src/components/SuperSearch.vue and LiveNotificationsFeed.vue.
 */

/* =========================================================================
   SuperSearch
   ========================================================================= */
.super-search {
    --search-height: 3.9rem;
    --search-radius: 20px;
    --search-border: rgba(255, 255, 255, 0.16);
    --search-border-strong: rgba(138, 225, 160, 0.78);
    --search-surface: linear-gradient(
        180deg,
        rgba(38, 38, 38, 0.98) 0%,
        rgba(16, 16, 16, 0.98) 100%
    );
    --search-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
    position: relative;
    z-index: 1;
}

.super-search.show-results,
.super-search.is-focused {
    z-index: 30;
}

.super-search.show-results .search-bar {
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.super-search.big {
    --search-height: 4.7rem;
    --search-radius: 24px;
}

.super-search .search-bar {
    position: relative;
    display: flex;
    align-items: center;
    min-height: var(--search-height);
    padding: 0.55rem 0.85rem 0.55rem 0.95rem;
    border-radius: var(--search-radius);
    background: var(--search-surface);
    border: 1px solid var(--search-border);
    box-shadow: var(--search-shadow);
    backdrop-filter: blur(14px);
    transition: border-color 180ms ease, box-shadow 180ms ease,
        transform 180ms ease, background 180ms ease;
}

.super-search.is-focused .search-bar {
    border-color: var(--search-border-strong);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.38),
        0 0 24px rgba(60, 130, 72, 0.14);
    transform: translateY(-1px);
}

.super-search.is-loading .search-bar {
    border-color: rgba(138, 225, 160, 0.48);
}

.super-search .search-icon {
    position: relative;
    z-index: 1;
    width: 2.8rem;
    height: 2.8rem;
    min-width: 2.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.7rem;
    border-radius: 16px;
    color: #f4f6f4;
}

.super-search .search-icon svg {
    width: 1.3rem;
    height: 1.3rem;
}

.super-search .input-cont {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.super-search input {
    position: relative;
    z-index: 1;
    background: transparent !important;
    color: white;
    width: 100%;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.4;
    border: 0 !important;
    outline: none;
    box-shadow: none !important;
    appearance: none;
    padding: 0.2rem 3rem 0.2rem 0;
}

.super-search.big input {
    font-size: 1.12rem;
}

.super-search input::placeholder {
    color: #b6bab6;
    font-weight: 400;
}

.super-search input:focus {
    outline: none;
    box-shadow: none !important;
}

.super-search .results {
    width: 100%;
    list-style: none;
    position: absolute;
    top: calc(100% - 0.35rem);
    left: 0;
    margin: 0;
    padding: 1rem 0.65rem 0.65rem;
    text-align: left;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(
        180deg,
        rgba(20, 20, 20, 0.995) 0%,
        rgba(7, 7, 7, 0.995) 100%
    );
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(22px);
    z-index: 31;
    max-height: calc(100vh - 10rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: none;
}
.super-search.show-results .results {
    display: block;
}

.super-search .results li {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 140ms ease, transform 140ms ease,
        box-shadow 140ms ease;
}

.super-search .result-main {
    display: flex;
    align-items: flex-start;
    width: 100%;
    gap: 0.85rem;
}

.super-search .result-chip {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #eff5ef;
}

.super-search .result-copy {
    min-width: 0;
}

.super-search .title {
    display: block;
    color: #fff;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}

.super-search .addy {
    color: #bbc0bb;
    font-size: 0.93rem;
    line-height: 1.45;
}

.super-search .results li.active {
    background: linear-gradient(
        135deg,
        rgba(87, 157, 95, 0.32) 0%,
        rgba(38, 70, 42, 0.48) 100%
    );
    box-shadow: inset 0 0 0 1px rgba(163, 237, 185, 0.14);
    transform: translateX(2px);
}

.super-search .results-empty {
    color: #d7dbd7;
    justify-content: center;
    text-align: center;
    cursor: default;
}

.super-search .results li:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.super-search .loading-cont {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease;
}

.super-search.is-loading .loading-cont {
    opacity: 1;
}

.super-search .loading-icon {
    width: 1.3rem;
    height: 1.3rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #8ae1a0;
    border-radius: 50%;
    animation: super-search-spin 0.8s linear infinite;
}

@keyframes super-search-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .super-search {
        --search-height: 3.55rem;
        --search-radius: 18px;
    }
    .super-search.big {
        --search-height: 4.15rem;
    }
    .super-search .search-bar {
        padding: 0.45rem 0.7rem 0.45rem 0.8rem;
    }
    .super-search .search-icon {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        margin-right: 0.6rem;
    }
    .super-search input,
    .super-search.big input {
        font-size: 1rem;
    }
    .super-search .results {
        top: calc(100% - 0.3rem);
        padding: 0.8rem 0.5rem 0.5rem;
        border-radius: 18px;
        max-height: calc(100vh - 8.5rem);
    }
    .super-search .results li {
        padding: 0.8rem 0.85rem;
    }
    .super-search .title {
        font-size: 0.98rem;
    }
    .super-search .addy {
        font-size: 0.88rem;
    }
}

/* =========================================================================
   LiveNotificationsFeed
   ========================================================================= */
.live-feed {
    margin: 2em auto 0;
    padding: 0.9em 1.1em;
    background: rgba(10, 22, 16, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    display: flex;
    gap: 1em;
    align-items: center;
    overflow: hidden;
}

.live-feed[hidden] {
    display: none;
}

.live-feed-header {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    flex-shrink: 0;
    padding-right: 1em;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.live-dot-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4757;
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.6);
    animation: live-pulse 1.8s ease-out infinite;
}

@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.live-label {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: #ff4757;
    font-weight: 700;
}

.live-count {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    transition: transform 0.3s ease;
}

.live-count.bumped {
    transform: scale(1.05);
}

.live-count strong {
    font-size: 1.25rem;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.live-count-label {
    font-size: 0.72rem;
    color: #cfd5cf;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.live-feed-track-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(90deg, #000 0, #000 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 96%, transparent 100%);
}

.live-feed-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.4em;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.live-feed-track::-webkit-scrollbar {
    display: none;
}

.live-feed-item {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15em;
    padding: 0.45em 0.9em;
    border-radius: 14px;
    background: rgba(92, 185, 92, 0.12);
    border: 1px solid rgba(92, 185, 92, 0.28);
    color: #e9f3e9;
    font-size: 0.86rem;
    flex-shrink: 0;
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s ease,
        max-width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        margin 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 30rem;
    opacity: 1;
}

.live-feed-item.entering {
    opacity: 0;
    transform: translateX(-120%);
    max-width: 0;
    padding-left: 0;
    padding-right: 0;
    margin-right: -1.4em;
}

.feed-line {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    white-space: nowrap;
}

.feed-line-secondary {
    font-size: 0.78rem;
    opacity: 0.88;
}

.feed-time {
    color: #9fd19f;
    font-variant-numeric: tabular-nums;
}

.feed-hotel {
    color: #fff;
    font-weight: 600;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-dates {
    color: #cfd5cf;
}

.feed-email {
    color: #b9d4b9;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-email .icon-mail {
    width: 0.85em;
    height: 0.85em;
    display: inline-block;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M2 5.5A2.5 2.5 0 0 1 4.5 3h15A2.5 2.5 0 0 1 22 5.5v13a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 18.5v-13zm2.4.5 7.6 5.7L19.6 6H4.4zM20 7.8l-7.4 5.6a1 1 0 0 1-1.2 0L4 7.8V18.5c0 .3.2.5.5.5h15c.3 0 .5-.2.5-.5V7.8z'/></svg>") center/contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M2 5.5A2.5 2.5 0 0 1 4.5 3h15A2.5 2.5 0 0 1 22 5.5v13a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 18.5v-13zm2.4.5 7.6 5.7L19.6 6H4.4zM20 7.8l-7.4 5.6a1 1 0 0 1-1.2 0L4 7.8V18.5c0 .3.2.5.5.5h15c.3 0 .5-.2.5-.5V7.8z'/></svg>") center/contain no-repeat;
}

.feed-sep {
    color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 768px) {
    .live-feed {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7em;
    }
    .live-feed-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        padding-right: 0;
        padding-bottom: 0.5em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .feed-hotel {
        max-width: 10rem;
    }
}
