/* Panmi Veranstaltungen - Main Stylesheet */

:root {
    --primary: #8B0000;
    --primary-light: #a52a2a;
    --primary-dark: #5c0000;
    --dark-bg: #1a1a2e;
    --card-bg: #ffffff;
    --text: #333333;
    --text-muted: #6c757d;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar {
    background: var(--dark-bg) !important;
}

.navbar-brand {
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Event Cards (User Area) */
.area-user .event-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.area-user .event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
}

.area-user .event-card .card-title {
    color: var(--primary);
}

/* Registration Form */
.participant-block {
    padding-bottom: 1rem;
}

/* Validation: red border + red label for invalid required fields */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.was-validated .form-check-input:invalid {
    border-color: #dc3545 !important;
}

.was-validated .form-check-input:invalid ~ .form-check-label {
    color: #dc3545;
}

.was-validated .form-control:invalid + label,
.was-validated .form-select:invalid + label,
.was-validated label:has(+ .form-control:invalid),
.was-validated label:has(+ .form-select:invalid) {
    color: #dc3545;
}

.was-validated .form-label.is-invalid {
    color: #dc3545;
}

.was-validated .form-control:valid,
.was-validated .form-select:valid,
.was-validated .form-check-input:valid {
    border-color: #dee2e6;
    box-shadow: none;
}

.was-validated .form-check-input:valid ~ .form-check-label {
    color: inherit;
}

.price-display {
    background: #f0f8f0;
    border: 1px solid #c3e6cb;
}

.total-display {
    background: linear-gradient(135deg, var(--dark-bg), #16213e);
    color: white;
}

.total-display h4 {
    opacity: 0.8;
    font-size: 1rem;
}

/* Admin Tables */
.area-admin .table th {
    font-size: 0.85rem;
    white-space: nowrap;
}

.area-admin .table td {
    font-size: 0.85rem;
    vertical-align: middle;
}

.group-leader-row {
    border-top: 3px solid var(--primary) !important;
}

.group-member-row {
    background-color: #f8f9fa !important;
    border-left: 3px solid var(--primary);
}

/* Admin Stats Cards */
.area-admin .card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Scanner Area */
.area-scanner #qr-reader {
    border-radius: 8px;
    overflow: hidden;
}

.area-scanner #qr-reader video {
    border-radius: 8px;
}

/* Footer */
footer {
    background: var(--dark-bg) !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .area-user h1 {
        font-size: 1.8rem;
    }

    .area-admin .table {
        font-size: 0.75rem;
    }

    .area-admin .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    .participant-block .card {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
}

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

.card {
    animation: fadeIn 0.3s ease;
}

/* Alert animations */
.alert {
    animation: fadeIn 0.2s ease;
}

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

/* Print styles */
@media print {
    .navbar, footer, .no-print, .btn {
        display: none !important;
    }
    main {
        padding: 0 !important;
    }
}
