/* SkillsUSA mobile score/report lookup styles
   Shared by Finalists, Medalists, Scores landing/menu, and related contestant-facing result pages.
   Merged from:
   - ScoreLookupMobile_FinalistsWorking.css
   - ScoreLookupMobile_MedalistScoresWorking.css
*/

:root {
    --skills-navy: #001a70;
    --skills-blue: #1c3f94;
    --skills-red: #e31b35;
    --skills-red-dark: #b8172a;

    --page-bg: #f4f7fb;
    --panel-bg: #ffffff;
    --panel-bg-soft: #f5f7fb;
    --bg-soft: #f5f7fb;

    --text-main: #111827;
    --text-muted: #5b6475;

    --border-soft: #d9dfec;
    --border-lighter: #eef1f7;

    --shadow-card: 0 6px 18px rgba(17, 24, 39, 0.06);
    --shadow-panel: 0 8px 22px rgba(17, 24, 39, 0.06);

    --radius-lg: 18px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: var(--text-main);
}

.page-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 18px 14px 36px 14px;
}

/* Shared page header / logo block */
.hero {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 18px;
    align-items: center;
    margin-bottom: 28px;
}

.hero-logo,
.hero-sponsor {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-logo img {
    max-width: 170px;
    width: 100%;
    height: auto;
}

.hero-sponsor img {
    max-width: 300px;
    width: 100%;
    height: auto;
}

.hero-title { text-align: center; }

.hero-title h1 {
    margin: 0 0 10px 0;
    color: var(--skills-navy);
    font-size: clamp(1.25rem, 2.4vw, 1.9rem);
    line-height: 1.2;
}

.hero-title h2,
.hero-title h3,
.hero-title .subtitle {
    margin: 0;
    color: var(--skills-navy);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.3;
    font-weight: 600;
}

/* Shared lookup / filter panels */
.lookup-card,
.lookup-panel {
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-panel);
    margin-top: 16px;
    margin-bottom: 20px;
}

.lookup-title {
    margin: 0 0 14px 0;
    color: var(--skills-navy);
    font-size: 1.2rem;
}

.intro-text {
    margin: 0 0 12px 0;
    font-size: 1rem;
    line-height: 1.45;
}

.form-grid,
.lookup-row {
    display: grid;
    gap: 14px;
    align-items: end;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lookup-row {
    grid-template-columns: 1fr auto;
    margin-top: 12px;
}

.field-block label,
.field-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--skills-navy);
}

.field-block select,
.field-block input[type="submit"],
.contest-select,
.lookup-button,
.primary-button {
    width: 100%;
    min-height: 42px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

.field-block select,
.contest-select {
    border: 1px solid #aeb7c8;
    padding: 7px 10px;
    background: #fff;
}

.lookup-button,
.primary-button {
    border: none !important;
    color: #fff !important;
    font-weight: bold;
    padding: 10px 18px;
    cursor: pointer;
}

.lookup-button {
    background: var(--skills-navy);
}

.lookup-button:hover {
    background: #001052;
}

.primary-button {
    background: var(--skills-red) !important;
}

.primary-button:hover {
    background: var(--skills-red-dark) !important;
}

.note,
.status-message {
    margin: 14px 0 0 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.error-message {
    color: #b00020;
    font-weight: bold;
    margin-top: 14px;
}

.results-panel {
    margin-top: 16px;
}

.contact-box {
    color: var(--skills-navy);
    font-size: 1.05rem;
    line-height: 1.45;
    margin: 14px 0 8px 0;
}

.report-header {
    margin: 18px 0 12px 0;
    color: var(--skills-navy);
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
    line-height: 1.25;
}

/* Finalists / generic result cards */
.finalist-list,
.result-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.finalist-card,
.result-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.finalist-card-header,
.result-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e5edf6;
}

.state-badge,
.result-chip {
    flex: 0 0 auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: bold;
    white-space: nowrap;
}

.state-badge {
    min-width: 44px;
    color: #fff;
    background: var(--skills-red);
    font-size: 0.95rem;
}

.time-slot {
    color: var(--skills-navy);
    font-weight: bold;
}

/* Medalist cards - keep this layout stable for the working Medalists page */
.medalist-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.medalist-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.medalist-topline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.contest-name {
    margin: 0;
    font-weight: bold;
    color: var(--skills-navy);
    line-height: 1.25;
    padding-top: 2px;
    font-size: 1.05rem;
}

.winner-name {
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 8px;
}

/* Shared details grid/rows */
.detail-grid {
    display: grid;
    gap: 8px;
}

.detail-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    padding: 4px 0;
    border-top: 1px solid var(--border-lighter);
    align-items: baseline;
}

.detail-grid .detail-row:first-child {
    border-top: 0;
}

.detail-label {
    color: var(--text-muted);
    font-weight: bold;
    font-size: 0.9rem;
}

.detail-value {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Medal chips */
.medal-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 74px;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 0.88rem;
    text-align: center;
    white-space: nowrap;
    border: 1px solid rgba(0,0,0,.12);
    flex: 0 0 auto;
}

.medal-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.medal-gold { background: #ffd700; color: #3b2b00; }
.medal-silver { background: #c0c0c0; color: #1f2937; }
.medal-bronze { background: #cd7f32; color: #ffffff; }
.medal-place { background: var(--skills-blue); color: #ffffff; }

.empty-results {
    padding: 18px;
    background: var(--panel-bg);
    border: 1px dashed #b8c7d9;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-align: center;
}

.hidden-reference {
    color: #ffffff;
    font-size: 1px;
}

/* Score landing page - vertical mobile-first link sections */
.scores-home {
    max-width: 980px;
}

.scores-hero {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 240px;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-panel);
}

.scores-hero-logo,
.scores-hero-sponsor {
    text-align: center;
}

.scores-hero-logo img {
    max-width: 140px;
    width: 100%;
    height: auto;
}

.scores-hero-sponsor img {
    max-width: 220px;
    width: 100%;
    height: auto;
}

.scores-hero-copy h1 {
    margin: 0 0 8px 0;
    color: var(--skills-navy);
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.15;
}

.scores-hero-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.45;
}

.score-link-section {
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin: 18px 0;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05);
}

.score-link-section-header {
    margin-bottom: 14px;
}

.score-link-section-header h2 {
    margin: 0 0 5px 0;
    color: var(--skills-navy);
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    line-height: 1.2;
}

.score-link-section-header p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.4;
}

.score-link-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.score-link-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 24px;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 14px;
    color: var(--text-main);
    box-shadow: 0 5px 16px rgba(17, 24, 39, 0.05);
}

.score-link-card:hover,
.score-link-card:focus {
    border-color: var(--skills-red);
    box-shadow: 0 7px 20px rgba(17, 24, 39, 0.09);
    outline: none;
}

.score-link-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e7ebf3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-link-icon {
    max-width: 48px;
    max-height: 48px;
    width: auto;
    height: auto;
}

.score-link-content {
    display: block;
    min-width: 0;
}

.score-link-title {
    display: block;
    color: var(--skills-navy);
    font-weight: bold;
    font-size: 1.12rem;
    line-height: 1.25;
    margin-bottom: 3px;
}

.score-link-description {
    display: block;
    color: var(--text-muted);
    font-size: .96rem;
    line-height: 1.35;
}

.score-link-arrow {
    color: var(--skills-red);
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    text-align: right;
}

/* Responsive behavior */
@media (max-width: 760px) {
    .page-shell {
        padding: 12px 10px 28px 10px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 18px;
    }

    .hero-logo img {
        max-width: 145px;
    }

    .hero-sponsor img {
        max-width: 240px;
    }

    .hero-title { order: 2; }
    .hero-logo { order: 1; }
    .hero-sponsor { order: 3; }

    .form-grid,
    .lookup-row {
        grid-template-columns: 1fr;
    }

    .lookup-button,
    .primary-button {
        width: 100%;
    }

    .lookup-card,
    .lookup-panel {
        padding: 14px;
        border-radius: 14px;
    }

    .finalist-list,
    .result-card-list,
    .medalist-list {
        grid-template-columns: 1fr;
    }

    .medalist-topline {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .detail-row {
        grid-template-columns: 82px minmax(0, 1fr);
        font-size: .98rem;
    }

    .scores-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 15px;
        border-radius: 16px;
    }

    .scores-hero-logo img {
        max-width: 125px;
    }

    .scores-hero-sponsor img {
        max-width: 210px;
    }

    .score-link-section {
        padding: 14px;
        border-radius: 16px;
    }

    .score-link-card {
        grid-template-columns: 58px minmax(0, 1fr) 18px;
        gap: 11px;
        padding: 12px;
    }

    .score-link-icon-wrap {
        width: 54px;
        height: 54px;
        border-radius: 12px;
    }

    .score-link-icon {
        max-width: 40px;
        max-height: 40px;
    }

    .score-link-title {
        font-size: 1.05rem;
    }

    .score-link-description {
        font-size: .92rem;
    }
}

@media (max-width: 420px) {
    .page-shell {
        padding: 10px;
    }

    .finalist-card,
    .medalist-card,
    .result-card {
        border-radius: 14px;
        padding: 14px;
    }

    .finalist-card-header,
    .result-card-header {
        display: block;
    }

    .state-badge {
        margin-top: 8px;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 7px 0;
    }

    .detail-row:last-child {
        border-bottom: 0;
    }
}

/* Detailed contestant score lookup */
.score-detail-intro {
    margin: 0 0 14px 0;
    color: var(--skills-navy);
    font-size: 1.1rem;
    line-height: 1.35;
    font-weight: bold;
}

.round-options table {
    border-collapse: collapse;
}

.round-options td {
    padding-right: 16px;
    font-size: 1.02rem;
}

.round-options input[type="radio"] {
    transform: scale(1.15);
    margin-right: 6px;
}

.competitor-summary-card {
    margin: 14px 0;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.competitor-name {
    color: var(--skills-navy);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-weight: bold;
    line-height: 1.25;
    margin-bottom: 4px;
}

.competitor-school {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: bold;
}

.rank-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--skills-navy);
    font-weight: bold;
    font-size: .98rem;
}

.score-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 16px 0;
}

.score-summary-box {
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.score-summary-label {
    display: block;
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.score-summary-value {
    display: block;
    color: var(--skills-navy);
    font-size: 1.45rem;
    font-weight: bold;
    line-height: 1.1;
}

.score-detail-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
}

.score-detail-card {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.score-detail-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-lighter);
}

.skill-area-name {
    color: var(--skills-navy);
    font-weight: bold;
    font-size: 1.05rem;
    line-height: 1.3;
    min-width: 0;
}

.score-type-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: bold;
    white-space: nowrap;
}

.score-type-standard {
    background: #e8eefb;
    color: var(--skills-navy);
    border: 1px solid #c9d5ee;
}

.score-type-penalty {
    background: #fff0f2;
    color: var(--skills-red-dark);
    border: 1px solid #f2c4cc;
}

.score-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.score-metric {
    border: 1px solid var(--border-lighter);
    background: #fbfcff;
    border-radius: 12px;
    padding: 9px 8px;
    min-width: 0;
}

.score-metric-label {
    display: block;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 4px;
}

.score-metric-value {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.2;
    font-weight: bold;
    overflow-wrap: anywhere;
}

.score-metric-your-score {
    border-color: #f0c400;
    background: #fff8bf;
}

.score-metric-your-score .score-metric-label,
.score-metric-your-score .score-metric-value {
    color: #3b2b00;
}

.score-metric-percent {
    background: #f8fafc;
}

@media (max-width: 760px) {
    .score-summary-grid {
        grid-template-columns: 1fr;
    }

    .score-detail-topline {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .score-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .score-metric-your-score {
        grid-column: span 2;
    }
}

@media (max-width: 420px) {
    .round-options td {
        display: block;
        padding: 4px 0;
    }

    .score-metric-grid {
        grid-template-columns: 1fr;
    }

    .score-metric-your-score {
        grid-column: auto;
    }
}

/* Detailed score rank medal chip */
.competitor-summary-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.competitor-summary-main {
    min-width: 0;
}

.score-medal-chip {
    margin-top: 2px;
    font-size: .95rem;
}

@media (max-width: 520px) {
    .competitor-summary-topline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .score-medal-chip {
        margin-top: 4px;
    }
}
