/* Extras Page Custom Styles */

/* Styling für den Container der Gruppen-ID-Liste */
.group-id-list-container {
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    margin-bottom: 20px;
    padding: 1.25rem;
    margin-top: 24px;
    min-width: 0;
}

/* Innere Elemente des Containers */
.group-id-list-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Styling für die Tabelle */
.group-id-table {
    width: 100%;
    border-collapse: collapse;
}

/* Mobile: horizontales Scrollen für breite Tabellen ermöglichen */
.group-id-table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

/* Verhindert, dass Aktionsspalten (u.a. Teilen Ja/Nein) aus dem Viewport ragen */
.group-id-table {
    min-width: 760px;
}

.group-id-table th, .group-id-table td {
    padding: 8px;
    text-align: left;
}

.group-id-table th:nth-child(6),
.group-id-table td:nth-child(6) {
    min-width: 72px;
}

.group-id-table th:nth-child(7),
.group-id-table td:nth-child(7) {
    min-width: 64px;
}

.group-id-table td .btn-group {
    display: inline-flex;
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    .group-id-table-responsive {
        position: relative;
        z-index: 1;
        overflow-x: scroll;
    }

    .group-id-table th,
    .group-id-table td {
        white-space: nowrap;
    }

    /* Mobile: Nummern-Spalte ausblenden */
    .group-id-table th:nth-child(1),
    .group-id-table td:nth-child(1) {
        display: none;
    }

    /* Mobile: "Teilen" auf zwei Zeilen umbrechen */
    .group-id-table th:nth-child(6) {
        white-space: normal;
        word-break: break-all;
        line-height: 1.05;
        max-width: 42px;
    }

    .group-id-table td .btn {
        padding: 0.2rem 0.45rem;
        font-size: 0.75rem;
        line-height: 1.2;
    }

    /* Share-Spalte: Buttons untereinander, damit nichts rechts abgeschnitten wird */
    .group-id-table td:nth-child(6) .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 2px;
    }

    .group-id-table td:nth-child(6) .btn-group .btn {
        width: 100%;
        margin: 0;
        padding: 0.18rem 0.3rem;
        font-size: 0.72rem;
    }
}

/* Styling für die Eingabefelder */
.group-id-table input[type="text"],
.group-id-table input[type="number"] {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
}

/* Styling für die Suche-Taste */
.search-button {
    padding: 5px 10px;
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    cursor: pointer;
}

/* Styling für das Textfeld unter der Liste */
.players-display {
    width: 100%;
    min-height: 100px;
    border: 1px solid #ddd;
    margin-top: 15px;
    padding: 10px;
}

/* Styling für die Kopier-Buttons */
.copy-buttons-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.copy-buttons-container button {
    padding: 5px 10px;
    cursor: pointer;
}

/* Feedback-Animation für erfolgreiche Kopieraktion */
.copy-success {
    animation: fadeInOut 1.5s;
}

@keyframes fadeInOut {
    0% { background-color: transparent; }
    30% { background-color: #d4edda; }
    70% { background-color: #d4edda; }
    100% { background-color: transparent; }
}

/* Styling für die Spieleranzeige */
.player-card {
    background-color: #f8f9fa;
}

.player-details {
    margin-left: 10px;
    font-size: 0.9rem;
}

.player-image {
    text-align: center;
}

.player-image img {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
}

/* Ersatz für Inline-Style-Attribute */
.extras-hero-logo {
    height: 64px;
}

.extras-hero-button {
    font-size: 1.3rem;
}

.extras-feature-icon {
    font-size: 2rem;
}

.extras-premium-icon {
    font-size: 2rem;
    color: var(--bs-warning);
}

.extras-inline-form {
    display: inline;
}

/* Key-Chat */
.key-chat-messages {
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    min-height: 120px;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.75rem;
    background: #fff;
}

.key-chat-message {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
}

.key-chat-message.user {
    background: #f0f7ff;
    border: 1px solid #d9ecff;
}

.key-chat-message.assistant {
    background: #f7f7f9;
    border: 1px solid #e8e8ee;
}

.key-chat-role {
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 0.15rem;
}

.key-chat-body {
    white-space: pre-wrap;
    word-break: break-word;
}
