/* =============================================
   ANWESENHEIT – KOMPAKTES DESIGN
   ============================================= */

.att-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 15px 20px 30px;
    flex: 1;
}

.att-main > section {
    margin-bottom: 12px;
}

.att-card {
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 14px;
}

.att-card h2 {
    margin: 0 0 10px 0;
    color: #000000;
    font-size: 15px;
}

/* --- TERMINZEILE --- */

.att-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.att-date-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.att-date-input {
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.att-date-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.att-save-hint {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--danger-color);
    display: none;
}

.att-save-hint.visible {
    display: inline-block;
}

/* --- ZÄHLER --- */

.att-summary {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.att-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 4px;
    padding: 2px 8px;
    border: 1px solid transparent;
    font-size: 12px;
    line-height: 1.6;
}

.att-chip-zugesagt { background: #dcfce7; border-color: #bbf7d0; }
.att-chip-abgesagt { background: #fee2e2; border-color: #fecaca; }
.att-chip-offen   { background: #f1f5f9; border-color: var(--border-color); }

.att-chip-count {
    font-size: 13px;
    font-weight: 800;
    color: #000000;
}

.att-chip-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
}

/* --- ERFASSUNGSLISTE --- */

.att-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.att-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    min-height: 34px;
    flex-wrap: wrap;
}

.att-row:last-child {
    border-bottom: none;
}

.att-row:nth-child(even) {
    background: #f8fafc;
}

.att-row-name {
    flex: 1;
    min-width: 120px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    overflow-wrap: break-word;
}

.att-row-meta {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.att-row-status {
    display: flex;
    gap: 4px;
}

.att-btn-status {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: white;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.1s;
}

.att-btn-status:hover {
    background: #e2e8f0;
}

.att-btn-status.btn-zugesagt.active { background: #16a34a; border-color: #16a34a; color: white; }
.att-btn-status.btn-abgesagt.active { background: #dc2626; border-color: #dc2626; color: white; }
.att-btn-status.btn-offen.active    { background: #64748b; border-color: #64748b; color: white; }

/* --- INAKTIVE SPIELERINNEN --- */

.att-row-inactive {
    opacity: 0.55;
    background: #f1f5f9;
}

.att-row-inactive .att-row-name {
    color: var(--text-muted);
    font-weight: 500;
}

.att-row-inactive .att-btn-status {
    cursor: default;
}

.att-auto-absent {
    font-size: 11px;
    font-weight: 600;
    color: var(--danger-color);
    white-space: nowrap;
}

/* --- SCHNELL-HINZUFÜGEN --- */

.att-quickadd {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.att-quickadd-input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
}

.att-quickadd-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn-quickadd {
    padding: 5px 12px;
    background: #e2e8f0;
    color: #000000;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.btn-quickadd:hover { background: #cbd5e1; }

/* --- SPEICHERN --- */

.att-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-primary {
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.4; cursor: default; }

/* --- LADE-/LEEREZUSTÄNDE --- */

.loading-state {
    padding: 10px 8px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* --- RESPONSIVE (Handy: grosse Touch-Ziele) --- */

@media screen and (max-width: 768px) {
    .att-main { padding: 10px; }
    .att-card { padding: 10px; }

    .att-summary { flex-wrap: wrap; }

    /* Listenzeilen hoeher fuer entspanntes Treffen */
    .att-row {
        padding: 6px;
        min-height: 48px;
        gap: 6px;
    }
    .att-row-name {
        min-width: 100%;
        font-size: 14px;
    }
    .att-row-meta { display: none; }

    /* Status-Buttons: 44px Touch-Ziel */
    .att-btn-status {
        width: 44px;
        height: 44px;
        font-size: 20px;
        border-radius: 6px;
    }
    .att-row-status { gap: 8px; justify-content: flex-end; }
    .att-btn-status:hover { background: white; } /* Hover nur Desktop */

    /* Datum groesser zum Tippen */
    .att-date-input {
        padding: 8px 10px;
        font-size: 15px;
    }

    /* Quick-Add groesser */
    .att-quickadd { gap: 8px; }
    .att-quickadd-input {
        padding: 10px;
        font-size: 15px;
    }
    .btn-quickadd {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Speichern: voll breit und gross */
    .att-actions { justify-content: stretch; }
    .att-actions .btn-primary {
        width: 100%;
        padding: 13px 16px;
        font-size: 15px;
    }
}