/* Compact request list layout */
body.admin-page .req-head { display: grid; grid-template-columns: 180px 160px 1fr 180px 120px; gap: 8px; font-weight: 700; margin-bottom: 8px; }
body.admin-page .req-row { display: grid; grid-template-columns: 180px 160px 1fr 180px 120px; gap: 8px; align-items: center; padding: 4px 0; }
@media (max-width: 900px){
  body.admin-page .req-head,
  body.admin-page .req-row { grid-template-columns: 1fr; }
}
body.admin-page .req-col { overflow-wrap: anywhere; }
/* Fonts */
@font-face {
    font-family: 'Gudea';
    src: url('fonts/Gudea-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Right-aligned IP dropdown in admin filter */
body.admin-page .right-select {
    text-align: right;
    text-align-last: right; /* align selected text to the right */
}

/* ========================= */
/* Admin page design (scoped)*/
/* ========================= */
body.admin-page { background: var(--bg-color); color: var(--text-color); }
body.admin-page .wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
body.admin-page h1 { font-size: 22px; margin: 16px 0 8px 0; font-weight: 700; }
body.admin-page h2 { font-size: 18px; margin: 16px 0 8px 0; font-weight: 700; }
body.admin-page .section { padding: 12px 0; }
body.admin-page .meta { font-size: 12px; color: var(--muted); }
body.admin-page .list { display: block; padding: 0; margin: 0; list-style: none; }
body.admin-page .item { padding: 6px 0; }
body.admin-page .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; }
body.admin-page .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px){ body.admin-page .grid { grid-template-columns: 1fr; } }
body.admin-page .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1100px){ body.admin-page .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px){ body.admin-page .grid-3 { grid-template-columns: 1fr; } }
body.admin-page .code { white-space: pre-wrap; word-break: break-word; }
body.admin-page .box { padding: 10px; background: var(--panel); border-radius: 8px; }
body.admin-page .pill { display: inline-block; padding: 4px 10px; background: var(--pill); font-size: 12px; border-radius: 999px; }
body.admin-page .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
body.admin-page input,
body.admin-page select,
body.admin-page textarea,
body.admin-page button { font-family: inherit; font-size: 14px; border: none; outline: none; background: var(--pill); padding: 8px 10px; border-radius: 6px; }
body.admin-page button { background: #cbd5e1; }
body.admin-page .muted { color: var(--muted); }
/* Allow text selection inside admin overview (override global disabled selection) */
body.admin-page, body.admin-page * {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Header/Nav/Footer for admin */
body.admin-page .topbar { background: var(--secondary-color); color: #e5e7eb; }
body.admin-page .topbar-inner { max-width: 1100px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
body.admin-page .brand { font-weight: 700; letter-spacing: 0.2px; }
body.admin-page .nav { background: #111827; }
body.admin-page .nav-inner { max-width: 1100px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 10px; flex-wrap: wrap; }
body.admin-page .nav .pill { background: #e5e7eb; color: #0f172a; }
body.admin-page .nav .pill.active { background: var(--primary-color); color: #ffffff; }
body.admin-page .banner { max-width: 1100px; margin: 16px auto 8px auto; padding: 12px 16px; color: #fff; background: var(--primary-color); border-radius: 8px; text-align: center; font-weight: 700; }
body.admin-page .footbar { background: var(--secondary-color); color: #cbd5e1; margin-top: 32px; }
body.admin-page .footbar-inner { max-width: 1100px; margin: 0 auto; padding: 14px 16px; text-align: center; font-size: 12px; }
/* (bold/italic font-face rules are defined once below, to avoid duplicates) */

/* Variables */
:root {
    /* Restore original color scheme to match logo screenshot */
    --primary-color: #0e76a8;
    --secondary-color: #851919;
    --bg-color: #f5f5f5; /* page background slightly grey */
    --text-color: #333;
    --white: #ffffff;
    --table-even-row: #e1eef6;
    --border-radius-sm: 10px;
    --border-radius-md: 15px;
    --muted: #475569;
    --panel: #f1f5f9;
    --pill: #e2e8f0;
}

/* Basis */
body {
    font-family: 'Gudea', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

a {
    color: var(--text-color);
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
}

/* Typografie */
.title {
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
    padding: 0 10px;
    box-sizing: border-box;
    width: 100%;
    font-size: 1.5em;
    white-space: nowrap;
}

.title-info-line {
    margin: 15px 0;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-info-line > div:first-child {
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 5px;
}

.title-info-line > div:nth-child(2) {
    font-size: 1em;
}

/* Header */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
}

.header-table {
    width: 100%;
    border-collapse: collapse;
}

.header-table td {
    padding: 10px;
    vertical-align: middle;
}

.header-logo {
    width: 50%;
    text-align: center;
    padding-right: 20px;
}

.header-info {
    width: 50%;
    text-align: left;
    padding-left: 20px;
}

.header-info p {
    margin: 5px 0;
    text-align: center;
    /* All header address lines must have the same responsive size */
    font-size: clamp(12px, 1.6vw, 16px);
    white-space: nowrap;
}

/* Formular-Elemente */
.selection-row {
    margin: 15px 0;
    text-align: center;
}

.team-select-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.select-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blue-label {
    color: var(--primary-color);
    font-weight: bold;
}

select {
    padding: 10px;
    border-radius: var(--border-radius-sm);
    border: none; /* no borders across project */
    font-size: 1em;
    background-color: var(--white);
    color: var(--primary-color);
    width: 250px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* make dropdown more visible */
    font-family: 'Gudea', Arial, sans-serif; /* ensure Gudea in dropdowns */
}

.load-button, .pdf-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12); /* subtle elevation, no hover */
    font-family: 'Gudea', Arial, sans-serif; /* ensure Gudea in buttons */
}

.load-button {
    padding: 8px 15px;
}

.pdf-button {
    display: block;
    width: 200px;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 1em;
    text-align: center;
}

/* No hover effects allowed */

.pdf-button:disabled, button.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

button.disabled {
    opacity: 0.6;
}

/* Tabelle */
.player-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    table-layout: fixed;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.player-table th {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 12px 8px;
    cursor: pointer;
    font-size: 1em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

/* No hover effects allowed */

.player-table th:nth-child(3) {
    cursor: default;
}

.player-table th.sorted-asc::after {
    content: " ▲";
    font-size: 0.8em;
    color: #9fcfec;
}

.player-table th.sorted-desc::after {
    content: " ▼";
    font-size: 0.8em;
    color: #9fcfec;
}

.player-table td {
    padding: 10px 8px;
    text-align: center;
    background-color: var(--white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ensure all child elements of the player table are not selectable */
.player-table *, .player-table tr, .player-table th, .player-table td {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.player-table th.name, 
.player-table td.name,
.player-table th.vorname, 
.player-table td.vorname {
    text-align: left;
}

.player-table tr:nth-child(even) td {
    background-color: var(--table-even-row);
}

/* Spezielle Zeilenfärbungen */
.player-table tr[data-captain='true'] {
    background-color: #a8d1a8;
}

.player-table tr[data-youth='U16'] {
    background-color: #f0c1c1;
}

.player-table tr[data-youth='U18'] {
    background-color: #f3f3c8;
}

.player-table tr[data-captain='true'] td,
.player-table tr[data-youth='U16'] td,
.player-table tr[data-youth='U18'] td {
    background-color: inherit;
}

/* Formularvalidierung */
.required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 3px;
}

/* Validation without borders (use subtle background only) */
.form-field input:invalid,
.form-field select:invalid,
input:required:invalid,
select:required:invalid {
    background-color: rgba(231, 76, 60, 0.08);
}

input:required:valid,
select:required:valid {
    background-color: rgba(46, 204, 113, 0.08);
}

/* Dekorative Elemente */
.divider {
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--primary-color));
    margin: 20px 0;
    border-radius: 1px;
}

.timestamp {
    text-align: right;
    margin: 20px 0;
    font-size: 0.9em;
    color: #555;
}

.footer {
    text-align: center;
    margin: 20px 0;
    width: 100%;
}

.footer p {
    margin: 5px 0;
    text-align: center;
    font-size: 0.9em;
    width: 100%;
}

/* Cursors und Selektion */
a, button, select, .pdf-button, #team-dropdown, th[data-sort] {
    cursor: pointer;
}

p, div, td, th, span, h1, h2, h3, h4, h5, h6 {
    cursor: default;
}

/* Global selection disabled via body */

/* Responsives Design */
@media screen and (max-width: 1200px) {
    /* Keep same size across all lines; no per-line overrides */
    .header-info p { font-size: clamp(12px, 1.6vw, 16px); }
    
    .title {
        font-size: calc(10px + 1vw);
    }
}

@media (max-width: 768px) {
    .team-select-container {
        flex-direction: column;
        align-items: center;
    }
    
    .select-group {
        width: 100%;
        justify-content: center; /* Center label + select when stacked */
    }
}

/* Orientation notice overlay for small portrait devices (no borders/outlines) */
.orientation-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: none; /* toggled by JS */
    z-index: 9999;
}

.orientation-overlay .inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111827;
    padding: 20px 24px;
    border-radius: 12px;
    max-width: 90vw;
    text-align: center;
}

.orientation-overlay .inner p {
    margin: 0;
    font-size: clamp(14px, 2.5vw, 18px);
}

/* When small portrait shows the landscape notice, make header more compact */
.needs-landscape .header {
    padding: 12px 0;
}

.needs-landscape .header-logo img {
    /* Make logo smaller to leave room for address block */
    max-width: 60%;
    height: auto;
}

.needs-landscape .header-info p {
    /* Slightly smaller than default clamp to fit nicely */
    font-size: clamp(11px, 1.3vw, 14px);
}

/* Druckstile */
@media print {
    body {
        background-color: white;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        position: relative;
    }
    
    .pdf-button {
        display: none;
    }
    
    .header, .footer {
        box-shadow: none;
    }

    .container::before {
        content: "Online Ausdruck";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 100px;
        color: rgba(0, 0, 0, 0.1);
        pointer-events: none;
        z-index: 1000;
        white-space: nowrap;
        opacity: 0.5;
        font-weight: bold;
    }
}