/* ---------------------------------------------------------
   Base Styles
--------------------------------------------------------- */

body {
    font-family: Inter, system-ui, sans-serif;
    margin: 0;
    padding: 0 20px;
    background: #f7fbf8;
    color: #222;
    font-size: 14px;
}

.rt-container {
    max-width: 1000px;
    margin: auto;
}

.rt-small {
    font-size: 12px;
    opacity: 0.8;
}

/* ---------------------------------------------------------
   Header + Branding
--------------------------------------------------------- */

.rt-headerbar {
    position: sticky;
    top: 0;
    z-index: 500;
    background: #f7fbf8;
    border-bottom: none;
}

.rt-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 4px 0;
}

.rt-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rt-logo {
    background-image: url("/images/roadto.png");
    background-size: contain;
    background-repeat: no-repeat;
    width: 64px;
    height: 64px;
}

.rt-brand-title {
    font-size: 18px;
    font-weight: 700;
}

/* ---------------------------------------------------------
   Navigation
--------------------------------------------------------- */

.rt-tabs {
    display: flex;
    gap: 10px;
}

.rt-tab {
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    background: #e8f5e9;
    color: #0b6e4f;
    border: 1px solid #c8e6c9;
}

.rt-tab--active {
    background: #0b6e4f !important;
    color: #fff !important;
}

.rt-hamburger {
    display: none;
    font-size: 26px;
    background: none;
    border: none;
    color: #0b6e4f;
}

#norm-listtitle, #norm-season {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    background: #f7f7f7;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;

    transition: none;

    padding-right: 24px;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='12' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M2 4l4 4 4-4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    margin-top: 2px;
}

/* ---------------------------------------------------------
   Subheader
--------------------------------------------------------- */

.rt-subheader {
    padding-bottom: 6px;
    border-bottom: 2px solid #e0eee7;
}

.rt-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
}

.rt-h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.rt-meta-line {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
    white-space: nowrap;
    margin-left: auto;
    text-align: right;
}

.rt-filter-sticky {
    display: flex;
    gap: 20px;
    margin: 10px 0 6px 0;
}

.rt-select {
    padding: 4px 6px;
    font-size: 14px;
}

/* ---------------------------------------------------------
   Tabellen
--------------------------------------------------------- */

.rt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 14px;
}

.rt-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid #ccc;
    background: #f7fbf8;
}

.rt-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

/*.rt-qp-green { color: #0b6e4f; font-weight: 700; }*/
.rt-qp-green { color: #2e7d32; font-weight: 700; }
.rt-qp-yellow { color: #c7a600; font-weight: 700; }
.rt-qp-red { color: #d00; font-weight: 700; }

.rt-bnorm {
    font-size: 18px;
    text-align: center;
    color: #0b6e4f;
}

.rt-selected {
    font-size: 18px;
    color: #0b6e4f;
    font-weight: 700;
}

.rt-table thead {
    position: sticky;
    background: #f7fbf8;
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* ---------------------------------------------------------
   Desktop vs Mobile Darstellung
--------------------------------------------------------- */

#norms-list { display: block; }
#norms-list-mobile { display: none; }

/* ---------------------------------------------------------
   Mobile Cards
--------------------------------------------------------- */

.rt-card {
    background: #fff;
    border: 1px solid rgba(2,6,23,0.08);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 2px;
}

.rt-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rt-card-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.rt-card-empty {
    font-style: italic;
    opacity: 0.7;
}

.rt-check {
    color: #0b6e4f;
    font-weight: 700;
}

.rt-x {
    color: #d00;
    font-weight: 700;
}

.rt-card--discipline {
    background: #f7f7f7;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #0b6e4f;
    margin-top: 8px;
    margin-bottom: 2px;
}

.rt-card-discipline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.rt-card-discipline-name {
    font-weight: 700;
    color: #0b6e4f;
}

.rt-card-discipline-norm {
    font-size: 13px;
    opacity: 0.8;
    text-align: right;
    line-height: 1.2;
}

/* ---------------------------------------------------------
   Rankings
--------------------------------------------------------- */

.rt-discipline-header {
    font-size: 16px;
    font-weight: 700;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 3px solid #4caf50;
    color: #2e7d32;
    color: black;
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */

.rt-footer {
    margin-top: 40px;
    text-align: center;
    opacity: 0.7;
}

/* ---------------------------------------------------------
   Gender Tabs
--------------------------------------------------------- */

.rt-gender-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rt-tab2 {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    background: #f7f7f7;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
}

.rt-tab2--active {
    background: #0b6e4f;
    color: #fff;
    border-color: #0b6e4f;
}

#rt-norm-gender-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 2px;
}

/* ---------------------------------------------------------
   Mobile Optimierung
--------------------------------------------------------- */

@media (max-width: 768px) {

    .rt-hamburger {
        display: block;
    }

    .rt-tabs {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 6px;
        margin-top: 10px;
    }

    .rt-tabs.rt-tabs--open {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
    }

    .rt-filter-sticky {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    #norms-list { display: none; }
    #norms-list-mobile { display: block; }
    .rt-table thead { display: none; }

    .rt-heading-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .rt-meta-line {
        margin-left: auto;
        text-align: right;
        font-size: 12px;
        opacity: 0.8;
    }

    #rt-norm-gender-tabs {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #subheader-norms {
        display: none !important;
    }
}

/* ---------------------------------------------------------
   Desktop Fixes
--------------------------------------------------------- */

@media (min-width: 769px) {

    .rt-hamburger {
        display: none !important;
    }

    .rt-discipline-cell {
        display: flex;
        flex-direction: column;
        line-height: 1.25;
        white-space: normal;
    }

    .rt-disc {
        font-weight: 800;
        /*color: #2e7d32;*/
    }

    .rt-norm {
        font-size: 13px;
        opacity: 0.85;
    }

    .rt-tabs {
        position: relative;
        z-index: 1000;
    }

    /*.rt-tab2:hover {
        background: #eaeaea;
    }*/
}

/* -------------
   iPhone
---------------*/
@supports(padding: max(0px)) {
    .rt-headerbar {
        padding-top: max(0px, env(safe-area-inset-top)) !important;
    }
}



/* Hintergrundfarben für Tabellen */
.rt-table tbody {
    background: #ffffff;
}

.rt-table th {
    background: #f7f7f7 !important;    
}

/* QP und Datum rechtsbündig */
.rt-table td[data-label="QP"],
.rt-table td[data-label="Datum"] {
    text-align: right;
}



/* Mobile: Disziplin > 10 Zeichen → Zeilenumbruch erzwingen */
@media (max-width: 768px) {
    .rt-card-discipline-header {
        display: flex;
        flex-direction: column; /* Zeilenumbruch */
        align-items: flex-start;
    }

    .rt-card-discipline-name {
        display: inline-block;
        max-width: 100%;
        word-break: break-word; /* Falls extrem lange Wörter kommen */
    }
}


/* 16.04.2026*/
/* Normerfüllungen: Gender-Tabs + Meta rechts */
#rt-norm-gender-tabs {
    flex: 1;                 /* nimmt volle Breite im Filter-Sticky ein */
    display: flex;
    align-items: center;
    gap: 8px;
}

#norms-meta {
    margin-left: auto;       /* schiebt "Aktualisiert" nach rechts */
    text-align: right;
}

/* Rankings: Gender-Tabs + Meta rechts */
#rt-ranking-gender-tabs {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

#rankings-meta {
    margin-left: auto;
    text-align: right;
}




