/* === Admin-Tabelle === */

.gts-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    color: #00354d;
    border-radius: 12px;
    overflow: hidden;
}

.gts-admin-table thead {
    background-color: #00354d;
    color: white;
}

.gts-admin-table th,
.gts-admin-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.gts-admin-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.gts-admin-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.gts-admin-table tbody tr:hover {
    background-color: #fffbe6;
}

/* === Action-Button (Bearbeiten) === */

.gts-edit-btn {
    background: transparent;
    color: #6b7280;
    border: none;
    padding: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.gts-edit-btn:hover {
    color: #111827;
}


/* === Filter & Suchfeld + Erledigt-Badge === */

.gts-dashboard-controls {
    display: flex;
    gap: 12px;
    margin: 40px auto 20px auto;
    max-width: 1200px;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
}

.gts-dashboard-controls select,
.gts-dashboard-controls input[type="text"] {
    flex: 1;
    min-width: 260px;
    padding: 12px;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    box-sizing: border-box;
}

/* === Checkbox ohne Ellipsen-Stil === */
.gts-hide-erledigt-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    cursor: pointer;
    font-size: 14px;
    color: #00354d;
    font-weight: 500;
    user-select: none;
    background: none;
    border-radius: 0;
    transition: none;
}

/* Kein Hover-Effekt nötig mehr */
.gts-hide-erledigt-badge:hover {
    background: none;
}

.gts-hide-erledigt-badge input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #00354d;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s ease;
}

.gts-hide-erledigt-badge input[type="checkbox"]:checked {
    background: #00354d;
}

.gts-hide-erledigt-badge input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Beschriftung daneben – ganz schlicht */
.gts-badge-toggle {
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    background: none;
    padding: 0;
}


/* === Modal-Overlay === */

#gts-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.gts-modal.show {
    display: flex !important;
    animation: fadeIn 0.3s ease forwards;
}

/* === Modal-Inhalt === */

.gts-modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gts-modal-content select,
.gts-modal-content textarea {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f9fafb;
    color: #111827;
}

.gts-modal-content textarea::placeholder {
    color: #6b7280;
}

/* === Modal Buttons === */

.gts-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

#gts-modal-save,
#gts-modal-cancel {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#gts-modal-save {
    background: #ffef42;
    color: #000;
    font-weight: bold;
}

#gts-modal-save:hover {
    background: #e5dc3d;
}

#gts-modal-cancel {
    background: #f3f4f6;
    color: #111827;
}

#gts-modal-cancel:hover {
    background: #e5e7eb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

/* === Ticket-Formular (Frontend) === */

#gts-ticket-form {
    max-width: 720px;
    margin: 60px auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    font-family: system-ui, sans-serif;
    width: 100%;
}

#gts-ticket-form p {
    margin-bottom: 20px;
}

#gts-ticket-form label {
    color: #00354d !important;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

#gts-ticket-form input,
#gts-ticket-form textarea {
    width: 100% !important;
    padding: 16px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    background: #f9f9f9;
    color: #111;
    font-family: inherit;
    margin-bottom: 20px;
}

#gts-ticket-form input:disabled {
    background: #f1f1f1;
    color: #888;
}

#gts-ticket-form textarea {
    min-height: 120px;
    resize: vertical;
}

#gts-ticket-form button {
    background-color: #00354d;
    color: #fff;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
    margin-top: 10px;
}

#gts-ticket-form button:hover {
    background-color: #00293c;
}

.gts-file-link {
    display: inline-block !important;
    margin-top: 5px !important;
    padding: 4px 8px !important;
    background: #ecf0f1 !important;
    border-radius: 4px !important;
    font-size: 0.9em !important;
    color: #00354d !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer !important;
}

.gts-file-link:hover {
    background: #d0d7db !important;
    color: #001e2b !important;
    text-decoration: underline !important;
}


.gts-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
    display: inline-block;
}

.gts-badge.offen {
    background-color: #f39c12 !important;
}

.gts-badge.in_bearbeitung {
    background-color: #3498db !important;
}

.gts-badge.erledigt {
    background-color: #2ecc71 !important;
}

#gts-pagination {
    margin-top: 20px;
    text-align: center;
}

#gts-pagination button {
    margin: 0 4px;
    padding: 6px 10px;
    font-size: 0.85em;
    background-color: #f0f0f0;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#gts-pagination button:hover {
    background-color: #e0e0e0;
}

#gts-pagination .active {
    background-color: #00354d !important;
    color: #fff !important;
    font-weight: 600;
}


/* --- Collaboration Mode modern --- */
.gts-admin-avatar-only {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    background: #f3f4f6;
}

.gts-admin-avatar-only img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.gts-admin-avatar-only.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

/* Icon-Button */
.gts-icon-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 4px;
}

.gts-icon-btn:hover {
    color: #00354d;
}



.gts-action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gts-icon-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 4px;
}

.gts-icon-btn:hover {
    color: #00354d;
}


#gts-note-history {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1em;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1em;
}

.gts-note-entry {
    margin-bottom: 0.8em;
    font-size: 0.9em;
}

.gts-note-entry strong {
    color: #00354d;
}

.gts-note-date {
    float: right;
    font-size: 0.8em;
    color: #888;
}

#gts-note-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gts-note-modal .gts-modal-content {
    background: #fff;
    padding: 1.5em;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}


.gts-note-btn {
    position: relative;
}

.gts-note-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 999px;
    padding: 2px 6px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 0 1px white;
    animation: gts-fadein-scale 0.3s ease;
}

@keyframes gts-fadein-scale {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* === Action-Spalte optimiert === */
.gts-admin-table td:last-child,
.gts-admin-table th:last-child {
    width: 130px;
    min-width: 130px;
    text-align: center;
}

.gts-action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* === Info-Icon mit rotem Badge === */
.gts-note-btn {
    position: relative;
}

.gts-note-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 1px white;
    animation: gts-fadein-scale 0.25s ease;
    padding: 0; /* Wichtig: kein Padding, sonst verzerrt */
}


@keyframes gts-fadein-scale {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


