/* Terminplaner – Custom Styles */

/* Allgemein */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Poll-Tabelle */
.poll-table-wrapper {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.poll-table {
    min-width: 600px;
}

.poll-table th,
.poll-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.poll-table .participant-col {
    min-width: 160px;
    max-width: 220px;
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    border-right: 2px solid #dee2e6;
}

.poll-table thead th.participant-col {
    z-index: 2;
    background: #f8f9fa;
}

.poll-table .option-col {
    min-width: 80px;
    text-align: center;
}

/* Stimmen-Farben */
.vote-cell {
    cursor: default;
    transition: background-color 0.15s;
}

.vote-yes, .vote-cell.vote-yes {
    background-color: #d4edda !important;
}

.vote-no, .vote-cell.vote-no {
    background-color: #f8d7da !important;
}

.vote-maybe, .vote-cell.vote-maybe {
    background-color: #fff3cd !important;
}

.vote-icon {
    font-size: 1.1rem;
    font-weight: bold;
}

.vote-icon.vote-yes { color: #198754; }
.vote-icon.vote-no { color: #dc3545; }
.vote-icon.vote-maybe { color: #ffc107; }

/* Klickbare Stimmen-Zellen */
.vote-input-cell {
    cursor: pointer;
    user-select: none;
}

.vote-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 40px;
    transition: transform 0.1s;
}

.vote-toggle:hover {
    transform: scale(1.2);
}

/* Summenzeile */
.sum-cell {
    font-weight: bold;
}

/* Sortierbare Optionen */
.sortable-options .option-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: box-shadow 0.15s;
}

.sortable-options .option-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sortable-options .option-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.option-item .drag-handle {
    cursor: grab;
    color: #6c757d;
    margin-right: 0.5rem;
}

/* Kommentare */
.comment-card {
    border-left: 3px solid var(--bs-primary, #0d6efd);
}

/* Edit-Button in Tabelle */
.edit-vote-btn {
    padding: 0.1rem 0.3rem;
    font-size: 0.75rem;
    line-height: 1;
}

/* Bearbeiten-Modus Zeile */
tr.editing {
    background-color: #e8f4fd !important;
}

tr.editing .participant-col {
    background-color: #e8f4fd !important;
}

/* Poll-Beschreibung */
.poll-description {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    border-left: 3px solid var(--bs-primary, #0d6efd);
}

/* Navbar */
.navbar-brand img {
    max-height: 50px;
}

.navbar .nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.25rem;
    transition: background-color 0.15s, color 0.15s;
}

.navbar .nav-link:hover {
    color: var(--bs-primary) !important;
    background-color: rgba(0,0,0,0.05);
}

.navbar .nav-link.active {
    color: var(--bs-primary) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .poll-table .participant-col {
        min-width: 120px;
        max-width: 150px;
        font-size: 0.85rem;
    }

    .option-col {
        min-width: 60px !important;
        font-size: 0.8rem;
    }

    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
    }

    h2 {
        font-size: 1.4rem;
    }
}

/* Copy-Link Tooltip */
.copy-link-btn.copied {
    color: #198754;
    border-color: #198754;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Alert-Animationen */
.alert {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Code Feedback */
#customCodeFeedback.text-success { color: #198754 !important; }
#customCodeFeedback.text-danger { color: #dc3545 !important; }
