/* termine_style.css – Ergänzung zu classic.css/own.css für die Terminverwaltung */

.termine-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    align-items: start;
}

@media (max-width: 1000px) {
    .termine-layout {
        grid-template-columns: 1fr;
    }
}

.termine-panel {
    border: 3px solid var(--gelb);
    border-radius: 1.5rem;
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.termine-panel h2 {
    margin-bottom: 1rem;
}

.termine-stand {
    font-size: 0.85rem;
    color: var(--rosa);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.termine-sync-btn {
    font-size: 0.75rem;
    border: 2px solid var(--gelb);
    border-radius: 0.5rem;
    background-color: black;
    color: white;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
}

.termine-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.termine-table td {
    padding: 0.5rem 0.25rem;
    vertical-align: middle;
}

.termine-table td.left,
.termine-table td.lefttextarea {
    width: 35%;
    text-align: right;
    padding-right: 1rem;
    color: var(--lila);
    font-size: 0.9rem;
}

.termine-table td.right {
    width: 65%;
}

.termine-table input[type="text"],
.termine-table input[type="password"],
.termine-table input[type="datetime-local"],
.termine-table textarea,
.termine-table select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    background: #111;
    border: 1px solid var(--rosa);
    border-radius: 0.5rem;
    color: white;
}

.termine-table input[type="file"] {
    color: white;
    font-size: 0.85rem;
}

.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-upload-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-upload-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 100vmax;
    border: none;
    background-color: var(--lila);
    color: black;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.file-upload-btn:hover {
    background-color: #222;
    color: var(--lila);
}

.file-upload-name {
    color: white;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.termine-table input:focus,
.termine-table select:focus,
.termine-table textarea:focus {
    outline: none;
    border-color: var(--gelb);
}

/* Status-Umschalter (aktiv/inaktiv) */
.radio-button {
    padding: 0.4rem 1rem;
    border-radius: 100vmax;
    border: 2px solid var(--lila);
    background: black;
    color: var(--lila);
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.radio-button.selected {
    background: var(--lila);
    color: black;
}

input.termine-submit {
    padding: 0.6rem 1.5rem;
    border-radius: 100vmax;
    border: none;
    cursor: pointer;
    font-family: 'LCARS';
    font-size: 1rem;
	background: var(--gelb);
    color: black;
}

.users_termine_update,
.users_termine_delete {
    padding: 0.6rem 1.5rem;
    border-radius: 100vmax;
    border: none;
    cursor: pointer;
    font-family: 'LCARS';
    font-size: 1rem;
}

.users_termine_update {
    background: var(--gelb);
    color: black;
    margin-right: 0.75rem;
    margin-top: 0.5rem;
}

.users_termine_delete {
    background: var(--rot);
    color: black;
    margin-top: 0.5rem;
}

.termine-message {
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.termine-message.success { background: rgba(153, 255, 153, 0.15); color: #99ff99; border: 1px solid #99ff99; }
.termine-message.error   { background: rgba(255, 102, 102, 0.15); color: var(--rot); border: 1px solid var(--rot); }

.termine-empty {
    color: var(--rosa);
    font-size: 0.9rem;
}

.termine-filepreview {
    max-width: 150px;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.termine-sprache {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.termine-sprache button {
    padding: 0.3rem 0.8rem;
    border-radius: 100vmax;
    border: 2px solid var(--lila);
    background: black;
    color: var(--lila);
    cursor: pointer;
}

/* ===================== MOBILE: Tabelle stapeln statt quetschen ==================== */
@media (max-width: 650px) {
    .termine-panel {
        padding: 1rem;
        border-radius: 1rem;
    }

    .termine-table,
    .termine-table tbody,
    .termine-table tr {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .termine-table td {
        display: block;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0.35rem 0;
    }

    .termine-table td.left,
    .termine-table td.lefttextarea {
        text-align: left !important;
        padding-right: 0;
        padding-top: 0.6rem;
        font-weight: 600;
    }

    .termine-table td.right {
        padding-bottom: 0.3rem;
    }

    .termine-submit-row {
        flex-direction: column;
    }

    .termine-submit-row input[type="submit"] {
        width: 100%;
        text-align: center;
    }

    .radio-button {
        margin-bottom: 0.4rem;
    }

    .termine-table input[type="file"] {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Globales Sicherheitsnetz gegen horizontales Ausbrechen */
.termine-panel,
.termine-layout,
.accordion-inner {
    max-width: 100%;
    overflow-x: hidden;
}
