/* ============================================================
   RESET / BASE
   ============================================================ */

* { box-sizing: border-box; }

:root {
    --accent: #f0b323;
    --dark-blue: #0a162b;
    --slate: #64748b;
    --border: #eef2f6;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    background: #f5f6f8;
    color: #111;
    overflow-x: hidden;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    background: #ffffff;
    padding: 14px 0;
    margin-bottom: 20px;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo-link img { height: 56px; }

.header-tag {
    color: var(--dark-blue);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* ============================================================
   INTRO / INFO
   ============================================================ */

.instruction-box {
    max-width: 1000px;
    margin: 0 auto 25px;
    background: #fff;
    border-left: 5px solid var(--accent);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.instruction-box p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--slate);
    line-height: 1.5;
}

.instruction-box p strong { color: var(--dark-blue); }

.instruction-box .intro-text {
    flex: 1;
}
/* ============================================================
   LAYOUT CARD
   ============================================================ */

main.layout { padding: 0; }

.content {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* ============================================================
   SELECTOR / FILTER
   ============================================================ */

.selector-box,
.filter-bar {
    background: white;
    padding: 25px;
    border-radius: 18px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    gap: 15px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
}

.select-group,
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 220px;
    max-width: 260px;
}

.select-group label,
.filter-group label {
    font-size: 11px;
    font-weight: 900;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   TEAM COMBOBOX
   ============================================================ */

.team-combo { position: relative; }

.team-combo-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 600;
}

.team-combo-list {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ddd;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.team-combo-list li {
    padding: 8px 10px;
    cursor: pointer;
}

.team-combo-list li:hover { background: #f1f5f9; }

/* ============================================================
   SUMMARY
   ============================================================ */

.summary {
    margin: 15px 0 25px;
    padding: 14px 16px;
    background: #f8fafc;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    font-size: 14px;
}

.summary img {
    height: 32px;
    margin: 0 4px;
}

/* ============================================================
   TABLE
   ============================================================ */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

tbody tr:nth-child(even) td { background: #fafafa; }

td.team { white-space: nowrap; }

table img {
    height: 22px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Walkover */

.walkover-row {
    background: #fafafa;
    color: #777;
}

.wo-label {
    display: inline-block;
    font-size: 10px;
    background: #eee;
    color: #666;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 700;
    border: 1px solid #ccc;
}

/* ============================================================
   API / BUILDER
   ============================================================ */

.api-details {
    margin-top: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.api-details summary {
    padding: 12px 15px;
    background: #f8f9fa;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    position: relative;
}

.api-details summary::after {
    content: '▶';
    position: absolute;
    right: 15px;
    transition: transform 0.2s;
    font-size: 12px;
}

.api-details[open] summary::after { transform: rotate(90deg); }

.api-details .media-api { padding: 15px; }

.builder-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 8px;
}

.api-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.api-inline input {
    width: 260px;
    font-size: 12px;
}

/* ============================================================
   TOOL SWITCHER
   ============================================================ 

.tool-switcher-container {
    max-width: 1000px;
    margin: 20px auto 30px;
    display: flex;
    gap: 15px;
}

.switcher-link {
    flex: 1;
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    background: #f8f9fa;
    color: #6c757d;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.switcher-link:hover { background: #eef2f7; }

.switcher-link.active {
    background: white;
    color: #004a99;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-bottom: 3px solid #004a99;
} */

/* ============================================================
   EMBED MODE
   ============================================================ */

body.embed-mode {
    background: transparent;
}

.embed-mode main.layout,
.embed-mode .content {
    padding: 5px;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

.embed-mode .media-api { display: none; }

.embed-branding img {
    height: 26px !important;
    width: auto !important;
}

.embed-branding span { font-size: 12px; }

.embed-mode .team { white-space: nowrap; }

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

    table th:nth-child(2), table td:nth-child(2),
    table th:nth-child(7), table td:nth-child(7),
    table th:nth-child(8), table td:nth-child(8),
    table th:nth-child(9), table td:nth-child(9) {
        display: none;
    }

    thead th {
        font-size: 12px;
        padding: 6px 6px;
    }

    table { min-width: 450px; }

    .tool-switcher-container {
        flex-direction: column;
    }

    .builder-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ============================================================
   BUTTONS (LOCAL FIX)
   ============================================================ */

.btn-main {
    background: #193368;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-main:hover {
    background: #254a9a;
}

.btn-reset {
    background: #eef1f6;
    color: #333;
    border: 1px solid #ccd3dc;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-reset:hover {
    background: #e2e7f0;
}

/* ============================================================
   FILTER BAR – UNIFIED BUTTON SIZING
   ============================================================ */

.filter-group .btn-main,
.filter-group .btn-reset {
    width: 100%;
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;
    line-height: 1;

    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    box-sizing: border-box;
}
