/* Helferplan Custom Styles — Kulturverein Schneverdingen color scheme */

:root {
    --pico-primary: #79378a;
    --pico-primary-hover: #5e2a6b;
    --pico-primary-focus: rgba(121, 55, 138, 0.25);
    --pico-primary-inverse: #fff;
    --pico-primary-background: #79378a;
    --pico-primary-hover-background: #5e2a6b;
    --pico-color: #1c2b35;
    --pico-background-color: #f5f0f7;
    --pico-card-background-color: #fff;
    --kv-accent: #d8613c;
    --kv-bg-light: #ddeaf4;
}

nav.container-fluid {
    background: #79378a;
    padding: 0.5rem 1rem;
}
nav.container-fluid li > strong {
    color: #fff;
}
nav.container-fluid a {
    color: #e8d0f0;
}
nav.container-fluid a:hover {
    color: #fff;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--pico-border-radius);
    margin-bottom: 1rem;
}
.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Slot fill indicators */
.slot-fill {
    display: inline-block;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    margin-top: 0.25rem;
}
.slot-fill-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.slot-fill-bar.full { background: #28a745; }
.slot-fill-bar.partial { background: #ffc107; }
.slot-fill-bar.empty { background: #dc3545; }

/* Event cards */
.event-card {
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}
.event-card h4 {
    margin-bottom: 0.25rem;
}
.event-meta {
    color: var(--pico-muted-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}
.stat-card .stat-label {
    color: var(--pico-muted-color);
    font-size: 0.875rem;
}

/* Slot rows in event form */
.slot-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 80px 2fr auto;
    gap: 0.5rem;
    align-items: end;
    margin-bottom: 0.5rem;
}
@media (max-width: 1024px) {
    .slot-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .slot-row {
        grid-template-columns: 1fr;
    }
}

/* Login tabs */
.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
}
.login-tabs button,
.login-tabs a[role="button"] {
    flex: 1;
    border-radius: 0;
    margin: 0;
    text-align: center;
}
.login-tabs > :first-child {
    border-radius: var(--pico-border-radius) 0 0 var(--pico-border-radius);
}
.login-tabs > :last-child {
    border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0;
}
.login-tabs button.outline,
.login-tabs a.outline {
    opacity: 0.6;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }

/* Inline forms: prevent Pico CSS from making buttons full-width */
form[style*="display: inline"],
form[style*="display:inline"],
.inline-form {
    display: inline !important;
    margin: 0;
}
form[style*="display: inline"] button,
form[style*="display:inline"] button,
.inline-form button {
    width: auto !important;
    display: inline-block !important;
    margin-bottom: 0 !important;
}

/* Table action buttons: compact sizing */
.actions {
    white-space: nowrap;
}
.actions a, .actions button {
    margin-right: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}
td form {
    display: inline;
    margin: 0;
}
td form button {
    width: auto;
    display: inline-block;
    margin-bottom: 0;
}

/* Event card action buttons */
.event-card .actions form {
    display: inline;
    margin: 0;
}
.event-card .actions form button {
    width: auto;
    display: inline-block;
}

/* Assign page: inline form for assignment dropdown */
.assign-form {
    display: flex;
    gap: 0.5rem;
    align-items: end;
    margin: 0;
}
.assign-form select {
    margin-bottom: 0;
}
.assign-form button {
    margin-bottom: 0;
    white-space: nowrap;
    width: auto;
}

/* Filter form on events page */
.filter-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 1rem;
}
.filter-form label {
    flex: 1;
    min-width: 150px;
}
.filter-form button {
    width: auto;
    margin-bottom: var(--pico-spacing);
    white-space: nowrap;
}

/* PIN display */
.pin-display {
    font-size: 1.5rem;
    font-family: monospace;
    letter-spacing: 0.3em;
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px dashed var(--pico-primary);
    border-radius: var(--pico-border-radius);
    margin: 1rem 0;
}

/* My assignment highlight in Gesamtplan */
tr.my-slot td {
    background: #e8d0f0 !important;
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--pico-muted-border-color);
}
