/* Compiworld STWE Termin Finder – übernimmt grundsätzlich das aktive Theme */
.cw-stwe-wrap { max-width: 1120px; margin: 0 auto; }
.cw-stwe-muted, .cw-stwe-small { opacity: .75; }
.cw-stwe-small { font-size: .85em; }
.cw-stwe-error { color: #b00020; font-weight: 700; }
.cw-stwe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.cw-stwe-person { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cw-stwe-wrap input, .cw-stwe-wrap select, .cw-stwe-wrap textarea { width: 100%; box-sizing: border-box; }
.cw-stwe-button { cursor: pointer; margin-top: .75rem; }
.cw-stwe-secondary { opacity: .9; }
.cw-stwe-message { margin-top: .75rem; font-weight: 600; }
.cw-stwe-summary { padding: 1rem; border: 1px solid rgba(0,0,0,.12); margin: 1rem 0; }
.cw-stwe-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 .75rem; }
.cw-stwe-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid rgba(0,0,0,.12); }
.cw-stwe-dow { font-weight: 700; text-align: center; padding: .5rem; background: rgba(0,0,0,.05); border-right: 1px solid rgba(0,0,0,.12); }
.cw-stwe-day { min-height: 135px; padding: .45rem; border-top: 1px solid rgba(0,0,0,.12); border-right: 1px solid rgba(0,0,0,.12); background: rgba(255,255,255,.6); }
.cw-stwe-day-muted { opacity: .45; }
.cw-stwe-day-num { font-weight: 700; margin-bottom: .35rem; }
.cw-stwe-slot { padding: .45rem; margin-bottom: .45rem; border: 1px solid rgba(0,0,0,.12); border-radius: .35rem; background: rgba(255,255,255,.85); }
.cw-stwe-slot select { margin: .35rem 0; }
.cw-stwe-badges { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.cw-stwe-badge { display: inline-block; border-left: 4px solid; border-radius: 999px; padding: .12rem .45rem; font-size: .78em; }
.cw-stwe-login { max-width: 520px; padding: 1rem; border: 1px solid rgba(0,0,0,.12); }
@media (max-width: 900px) {
    .cw-stwe-calendar { display: block; border: 0; }
    .cw-stwe-dow { display: none; }
    .cw-stwe-day { min-height: auto; border: 1px solid rgba(0,0,0,.12); margin-bottom: .5rem; }
}
@media (max-width: 760px) {
    .cw-stwe-grid, .cw-stwe-person { grid-template-columns: 1fr; }
}

.cw-stwe-quick-select {
    margin: 1rem 0;
    padding: .75rem;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(0,0,0,.03);
}
.cw-stwe-mini-button {
    margin: .25rem .25rem .25rem 0;
    padding: .35rem .55rem;
    cursor: pointer;
}

.cw-stwe-button-link {
    display: inline-block;
    padding: .6rem .9rem;
    border: 1px solid currentColor;
    text-decoration: none;
    border-radius: .25rem;
}

.cw-stwe-day-add {
    margin-bottom: .35rem;
}
.cw-stwe-day-add-toggle,
.cw-stwe-day-add-submit {
    font-size: .78em;
    padding: .18rem .35rem;
    cursor: pointer;
}
.cw-stwe-day-add-panel {
    margin-top: .25rem;
    padding: .35rem;
    border: 1px dashed rgba(0,0,0,.25);
    border-radius: .25rem;
    background: rgba(0,0,0,.025);
}
.cw-stwe-day-add-panel input {
    margin-bottom: .25rem;
}
.cw-stwe-day-add-msg {
    font-size: .78em;
    font-weight: 600;
    margin-top: .2rem;
}

.cw-stwe-proposer-line {
    margin-top: .25rem;
}
.cw-stwe-proposer-badge {
    font-weight: 700;
}
.cw-stwe-badge {
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.cw-stwe-register-box {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .75rem 0;
    padding: .5rem .75rem;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.025);
}
.cw-stwe-savebar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .65rem .75rem;
    margin-top: 1rem;
    border: 1px solid rgba(0,0,0,.18);
    background: rgba(255,255,255,.96);
    box-shadow: 0 -2px 10px rgba(0,0,0,.08);
    font-weight: 700;
}
.cw-stwe-modal[hidden] { display: none; }
.cw-stwe-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.cw-stwe-modal-card {
    position: relative;
    width: min(760px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    color: #222;
    padding: 1rem;
    border-radius: .5rem;
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
.cw-stwe-modal-close {
    position: absolute;
    right: .6rem;
    top: .35rem;
    border: 0;
    background: transparent;
    font-size: 1.8rem;
    cursor: pointer;
}
.cw-stwe-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.cw-stwe-badge {
    position: relative;
    max-width: 100%;
}
.cw-stwe-badge:hover::after,
.cw-stwe-badge:focus::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 50;
    left: 0;
    bottom: 120%;
    min-width: 180px;
    max-width: 280px;
    white-space: normal;
    padding: .45rem .55rem;
    background: #222;
    color: #fff;
    border-radius: .35rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    font-size: .85rem;
    font-weight: 400;
}
@media (max-width: 760px) {
    .cw-stwe-modal-grid { grid-template-columns: 1fr; }
    .cw-stwe-savebar { display: block; }
    .cw-stwe-savebar .cw-stwe-button { width: 100%; margin-top: .5rem; }
    .cw-stwe-badge:focus::after { left: auto; right: 0; }
}

/* Version 1.6.2: Speicherbutton immer sichtbar */
.cw-stwe-wrap {
    padding-bottom: 105px;
}
.cw-stwe-savebar {
    position: fixed !important;
    left: 50%;
    transform: translateX(-50%);
    bottom: .6rem;
    width: min(1120px, calc(100% - 1rem));
    z-index: 9990;
    border-width: 2px;
}
.cw-stwe-savebar-alert {
    animation: cwStweSavePulse 1.2s ease-in-out infinite alternate;
}
@keyframes cwStweSavePulse {
    from { box-shadow: 0 -2px 10px rgba(0,0,0,.10); }
    to { box-shadow: 0 -2px 22px rgba(0,0,0,.25); }
}
.cw-stwe-confirm-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,.45);
}
.cw-stwe-confirm-card {
    width: min(420px, 100%);
    padding: 1.25rem;
    border-radius: .5rem;
    background: #fff;
    color: #222;
    text-align: center;
    box-shadow: 0 12px 38px rgba(0,0,0,.25);
}
.cw-stwe-confirm-card h3 {
    margin-top: 0;
}
@media (max-width: 760px) {
    .cw-stwe-wrap {
        padding-bottom: 125px;
    }
    .cw-stwe-savebar {
        bottom: 0;
        width: 100%;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 0;
    }
}

/* Version 1.6.3: Accountstatus und Verwaltung */
.cw-stwe-account-box {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .75rem 0;
    padding: .55rem .75rem;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(0,0,0,.035);
}
.cw-stwe-checkbox {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: .5rem 0;
}
.cw-stwe-checkbox input {
    width: auto;
}
.cw-stwe-danger-button {
    cursor: pointer;
    padding: .6rem .9rem;
    border: 1px solid #9b1c1c;
    background: #9b1c1c;
    color: #fff;
    border-radius: .25rem;
}
.cw-stwe-delete-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}
.cw-stwe-confirm-delete-card {
    text-align: center;
}

/* Version 1.6.4: registrierte Personen kommen ohne allgemeines Seitenpasswort hinein */
.cw-stwe-gate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
.cw-stwe-gate-card {
    padding: 1rem;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(0,0,0,.025);
}
@media (max-width: 760px) {
    .cw-stwe-gate-grid {
        grid-template-columns: 1fr;
    }
}

/* Version 1.6.5: Accountverwaltung korrekt im Hauptformular + Abmelden */
.cw-stwe-account-box .cw-stwe-mini-button {
    white-space: nowrap;
}
