/* MudBlazor supplies the component styling. This file covers the two things it can't:
   the landing page (deliberately not a MudBlazor-looking page) and the ad card, whose
   hover/accent behaviour needs real CSS rather than component parameters.

   Colours here are duplicated from JobHunterTheme.cs by necessity — CSS can't read it.
   If the palette changes there, the handful of literals below change too. */

html, body {
    margin: 0;
    font-family: Inter, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1:focus {
    outline: none;
}

/* Landing page ---------------------------------------------------------- */

.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    background: #080d17;
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* A single soft teal light source, rather than a full-page gradient wash. */
.landing::before {
    content: "";
    position: absolute;
    top: -30vh;
    left: 50%;
    transform: translateX(-50%);
    width: 120vw;
    height: 80vh;
    background: radial-gradient(ellipse at center, rgba(13, 148, 136, 0.22) 0%, transparent 62%);
    pointer-events: none;
}

.landing > * {
    position: relative;
}

.landing__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    margin-bottom: 2rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.07);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: #94a3b8;
}

.landing__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.landing__brand {
    font-size: clamp(2.6rem, 7vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    margin: 0 0 1.25rem;
    line-height: 1.03;
    color: #f8fafc;
}

.landing__brand span {
    color: #2dd4bf;
}

.landing__tagline {
    font-size: clamp(1rem, 2.1vw, 1.2rem);
    max-width: 36rem;
    margin: 0 0 2.75rem;
    color: #94a3b8;
    line-height: 1.65;
}

.landing__points {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 4.5rem;
    max-width: 64rem;
}

.landing__point {
    flex: 1 1 16rem;
    max-width: 20rem;
    padding: 1.6rem;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.045);
    border: 1px solid rgba(148, 163, 184, 0.13);
    text-align: left;
}

.landing__point h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
}

.landing__point p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #8494a8;
}

.landing__note {
    margin-top: 3.5rem;
    font-size: 0.78rem;
    color: #55637a;
}

/* Ad card ---------------------------------------------------------------- */

.ad-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Overridden inline per card with the user's own status colour. */
    border-left: 3px solid transparent;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.ad-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.13);
}

.ad-card__title {
    font-weight: 600;
    line-height: 1.35;
    /* Two lines then ellipsis, so one long job title can't set the row height. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* The card's primary action: opens the ad in a dialog. */
.ad-card__head {
    cursor: pointer;
    border-radius: 6px;
    outline-offset: 2px;
}

.ad-card__head:hover .ad-card__title {
    color: var(--mud-palette-primary);
}

.ad-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: center;
}

/* Pushes the actions to the bottom so cards in a row line up. */
.ad-card__spacer {
    flex-grow: 1;
}

/* Scraped descriptions arrive as plain text with meaningful line breaks, and can be
   long — keep their shape, and scroll rather than growing the dialog past the viewport. */
.ad-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 55vh;
    overflow-y: auto;
    line-height: 1.6;
}

/* Where the user stands on an ad. Tinted from --status so one hex from the theme drives
   the pill, the card stripe and the move buttons alike. */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--status);
    border: 1px solid var(--status);
    /* color-mix keeps the fill readable in both themes without a second hex. */
    background: color-mix(in srgb, var(--status) 12%, transparent);
}

/* A note the user wrote — set apart from the ad's own text, which is scraped. */
.ad-note {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border-left: 2px solid var(--mud-palette-lines-default);
    padding-left: 0.6rem;
    color: var(--mud-palette-text-secondary);
}

.tally {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tally__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    flex: none;
}

.tally__item {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

/* Side-menu counts ------------------------------------------------------- */

/* MudNavLink lays its child content out as a single inline span, so the row
   has to re-establish its own flex context to push the count to the edge. */
.nav-count__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.nav-count {
    min-width: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4rem;
    text-align: center;
    flex: none;
}

/* The active page's own count should not fade into the highlight behind it. */
.mud-nav-link.active .nav-count {
    background: var(--mud-palette-primary);
    color: #fff;
}

/* Day separators on the board -------------------------------------------- */

.day-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

/* Takes the slack between the label and the count, so both stay anchored. */
.day-heading__rule {
    flex: 1 1 auto;
    height: 1px;
    background: var(--mud-palette-lines-default);
}
