/* ==========================================================
   FUZ MICO – CALENDAR TABLE
   ========================================================== */


/* ==========================================================
   Reset: keine Zebra-Stripes, kein TR-hover innerhalb des Kalenders
   ========================================================== */
.fuz-mico-calendar-table,
.fuz-mico-calendar-table thead,
.fuz-mico-calendar-table tbody,
.fuz-mico-calendar-table tr,
.fuz-mico-calendar-table th,
.fuz-mico-calendar-table td {
    background: transparent;
}

.fuz-mico-calendar-table tbody tr:nth-child(even),
.fuz-mico-calendar-table tbody tr:nth-child(odd) {
    background: transparent;
}

table tbody>tr:nth-child(2n+1)>td,
table tbody>tr:nth-child(2n+1)>th {
    background-color: transparent;
}

/* Falls das Theme tr:hover einfärbt */
.fuz-mico-calendar-table tbody tr:hover {
    background: transparent !important;
}


.fuz-mico-calendar-overlay-left {
    position: absolute;
    height: 100%;
    width: 53px;
    top: 0;
    left: 0;
    background-color: #f6f8f9;
    z-index: 2;
}

/* ==========================================================
   Zebra Rows – kontrolliert (tbody)
   ========================================================== */

/* Ungerade Zeilen */
.fuz-mico-calendar-table tbody tr:nth-child(odd) td,
.fuz-mico-calendar-table tbody tr:nth-child(odd) th {
    background: #d1dce3;
}

/* Gerade Zeilen */
.fuz-mico-calendar-table tbody tr:nth-child(even) td,
.fuz-mico-calendar-table tbody tr:nth-child(even) th {
    background: #ffffff;
}


/* Wrapper: erlaubt horizontales Scrollen */
.fuz-mico-calendar {
    overflow-x: auto;
    overflow-y: visible;
    /* wichtig */
    --sportart-col: 280px;
    /* default */
}

/* Wenn gescrolled: collapse */
.fuz-mico-calendar.is-scrolled {
    --sportart-col: 48px;
}


/* Corner Cell (oben links) braucht höchstes z-index */
.fuz-mico-head-left {
    z-index: 4;
}

.fuz-mico-calendar table thead:first-child tr:first-child th {
    border-block-start: 0;
}


.fuz-mico-calendar button {
    padding: 0;
}

/* ----------------------------------------------------------
   Tabelle – fixes Grid
   ---------------------------------------------------------- */
.fuz-mico-calendar-table {
    /*table-layout: fixed;*/
    border-collapse: separate;
    border-spacing: 10px;
    width: auto;
}

/* ----------------------------------------------------------
   Kopfzeile
   ---------------------------------------------------------- */
.fuz-mico-calendar-table thead th {
    height: 48px;
    padding: 0;
    vertical-align: middle;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    color: #294754;
}

/* Erste Kopfzelle ("Februar") */
th.fuz-mico-head-left {
    text-align: right;
    padding-right: 8px !important;
    background-color: #f6f8f9;
}

/* Tages-Kopfzellen */
.fuz-mico-head-day {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    text-align: center;
}

/* -------------- Sticky First Column -------------- */
/* Erste Spalte sticky links */
.fuz-mico-head-left,
.fuz-mico-sportart-cell {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    /* wichtig fürs Überdecken beim Scroll */
    width: var(--sportart-col);
    min-width: var(--sportart-col);
    max-width: var(--sportart-col);
    transition: width 220ms ease, min-width 220ms ease, max-width 220ms ease;
}

/* Corner cell (Februar) ist sticky TOP+LEFT => höchster z-index */
.fuz-mico-head-left {
    z-index: 3;
}



/* ----------------------------------------------------------
   Body – Zeilen & Zellen
   ---------------------------------------------------------- */
.fuz-mico-calendar-table tbody th,
.fuz-mico-calendar-table tbody td {
    height: 48px;
    padding: 0;
    vertical-align: middle;
    border: none;
    border-radius: 10px;
}

/* ----------------------------------------------------------
   Erste Spalte – Sportarten
   ---------------------------------------------------------- */


.fuz-mico-sportart {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    min-width: 0;
}

.fuz-mico-sportart-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}

.fuz-mico-sportart-name {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #294754;
}

/* Damit die Sportart-Inhalte mit-animieren */
.fuz-mico-sportart {
    width: 100%;
    transition: padding 220ms ease;
}

/* -------------- Collapse: Name ausblenden -------------- */
/* Initial: Name sichtbar */
.fuz-mico-sportart-name {
    display: block;
    max-width: 220px;
    /* darfst du anpassen */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 180ms ease, max-width 220ms ease;
}

/* Wenn gescrolled: Name weg */
.fuz-mico-calendar.is-scrolled .fuz-mico-sportart-name {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
}

/* Optional: beim Collapse Padding reduzieren, damit es "eng" wirkt */
.fuz-mico-calendar.is-scrolled .fuz-mico-sportart {
    padding-left: 8px;
    padding-right: 8px;
}

/* Optional: Icon zentrieren, wenn Name weg ist */
.fuz-mico-calendar.is-scrolled .fuz-mico-sportart {
    justify-content: center;
}

/* ----------------------------------------------------------
   Tages-Zellen
   ---------------------------------------------------------- */
.fuz-mico-cell {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
}

/* Zell-Innenleben (Kachel) */
.fuz-mico-cell .table-cell-inner {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----------------------------------------------------------
   Marker Button
   ---------------------------------------------------------- */
button.fuz-mico-marker-btn {
    all: unset;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    border-radius: 10px;
}

button.fuz-mico-marker-btn:focus,
button.fuz-mico-marker-btn:focus-visible {
    outline: 2px solid #27404b;
    outline-offset: 3px;
    border-radius: 12px;
    background: #27404b;
}

button.fuz-mico-marker-btn:hover {
    background: #27404b;
}

.fuz-mico-marker {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #27404b;
}

.fuz-mico-marker-btn:focus-visible .fuz-mico-marker,
.fuz-mico-marker-btn:hover .fuz-mico-marker,
.fuz-mico-marker-btn:focus .fuz-mico-marker {
    background: white;
}

/* ----------------------------------------------------------
   Hover Highlight (Zeile + Spalte)
   ---------------------------------------------------------- */
.fuz-mico-cell.is-highlight .table-cell-inner {
    background: #27404b;
    color: white;
}

.fuz-mico-head-day.is-highlight {
    background: #e6ecef;
    /* gleiche Farbe wie Zellen */
    border-radius: 8px;
}

/* Highlight für Tages-Header */
.fuz-mico-head-day.is-highlight {
    background: #27404b;
    border-radius: 8px;
    color: white;
}

/* Highlight für Sportart-Zelle (erste Spalte) */
.fuz-mico-sportart-cell.is-highlight .fuz-mico-sportart {
    background: #27404b;
    border-radius: 12px;
    color: white;
}

.fuz-mico-sportart-cell.is-highlight .fuz-mico-sportart .fuz-mico-sportart-name {
    color: white;
}

/*Für Button marker when highlighted*/

.fuz-mico-cell.is-highlight .table-cell-inner .fuz-mico-marker {
    background: white;
}

/*Sportart Icon wenn highlight*/

.fuz-mico-sportart-cell.is-highlight .fuz-mico-sportart-icon {
    filter: brightness(0) invert(1);
}

/* ==========================================================
   FUZ MICO – MODAL
   ========================================================== */

/* Scroll lock */
html.fuz-mico-modal-open,
html.fuz-mico-modal-open body {
    overflow: hidden;
}

/* ----------------------------------------------------------
   Overlay
   ---------------------------------------------------------- */
.fuz-mico-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    display: none;
}

/* ----------------------------------------------------------
   Modal Wrapper
   ---------------------------------------------------------- */
.fuz-mico-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}



/* Modal aktiv */
.fuz-mico-calendar.is-open .fuz-mico-overlay {
    display: block;
}

.fuz-mico-calendar.is-open .fuz-mico-modal {
    display: flex;
    overflow-y: scroll;
}

.fuz-mico-calendar.is-open .fuz-mico-modal-absolute {
    min-height: 100vh;
    padding: 24px;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ----------------------------------------------------------
   Modal Inner
   ---------------------------------------------------------- */
.fuz-mico-modal-inner {
    width: 100%;
    max-width: 1100px;
}

/* ----------------------------------------------------------
   Modal Content
   ---------------------------------------------------------- */
.fuz-mico-modal-content {
    background: #2f4751;
    color: #ffffff;
    border-radius: 36px;
    padding: 32px 32px 36px;
    position: relative;
}

/* ----------------------------------------------------------
   Modal Header
   ---------------------------------------------------------- */
.fuz-mico-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: nowrap;
}

.fuz-mico-modal-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	width: auto;
}

.fuz-mico-modal-pill {
    background: rgba(255, 255, 255, 0.85);
    color: #1f2f36;
    border-radius: 14px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 500;
}

.fuz-mico-modal-sportart-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Close Button */
button.fuz-mico-modal-close {
    margin-left: auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 2px solid white;
    background: transparent;
    color: #ffffff;
    font-size: 1.625rem;
    line-height: 1;
    cursor: pointer;
	box-shadow: none;
	flex-shrink: 0;
}

button.fuz-mico-modal-close:hover,
button.fuz-mico-modal-close:focus-visible {
    color: #2f4751;
	background-color: white;
}

/* ----------------------------------------------------------
   Loading / Error
   ---------------------------------------------------------- */
.fuz-mico-modal-loading,
.fuz-mico-modal-error {
    padding: 48px 0;
    text-align: center;
    font-size: 1.125rem;
}

/* ----------------------------------------------------------
   Events
   ---------------------------------------------------------- */
.fuz-mico-event {
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.fuz-mico-event:first-child {
    border-top: none;
}

.fuz-mico-event-sub {
    font-size: 0.875rem;
    opacity: 0.9;
}

.fuz-mico-event-title {
    margin: 6px 0 0;
    font-size: 2.375rem;
    line-height: 1.05;
}

/* ----------------------------------------------------------
   Athletes Grid
   ---------------------------------------------------------- */
.fuz-mico-athletes {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 36px;
}

@media (max-width: 768px) {
    .fuz-mico-athletes {
        grid-template-columns: 1fr;
    }

    .fuz-mico-event-title {
        font-size: 1.75rem;
    }
}

/* ----------------------------------------------------------
   Athlete Item
   ---------------------------------------------------------- */
.fuz-mico-athlete {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fuz-mico-athlete-img {
    width: 62px;
    height: 62px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 62px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fuz-mico-athlete-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fuz-mico-athlete-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
}

.fuz-mico-athlete-name {
    font-size: 1.125rem;
    font-weight: 500;
}

.fuz-mico-athlete-note {
    margin-top: 2px;
    font-size: 0.875rem;
    opacity: 0.9;
}

.fuz-mico-star {
    margin-left: 2px;
}


/*Hinweis unter der Athleten liste*/

.fuz-mico-event-note {
    margin-top: 32px;
    font-size: 0.875rem;
    opacity: 0.85;
}