/* Eventanmeldung - CSS Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.4) 0%, rgba(139, 69, 19, 0.5) 100%), 
                url('../images/wald.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    padding: 2rem 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    background: linear-gradient(135deg, #2d5016 0%, #8b4513 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.card-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.card-body {
    padding: 2rem;
}

.event-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.event-info h3 {
    color: #0066cc;
    margin-bottom: 1rem;
}

.event-info p {
    color: #333;
    margin-bottom: 0.5rem;
}

.day-section {
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.day-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.day-header h3 {
    color: #495057;
    margin: 0;
    font-size: 1.3rem;
}

.day-content {
    padding: 1rem;
}

.resources-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.resources-table th,
.resources-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.resources-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.resources-table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-overnight {
    background-color: #2d5016;
    color: white;
}

.badge-meal {
    background-color: #228b22;
    color: white;
}

.badge-transport {
    background-color: #daa520;
    color: #2f1b14;
}

.badge-equipment {
    background-color: #8b4513;
    color: white;
}

.badge-other {
    background-color: #654321;
    color: white;
}

.capacity-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.capacity-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.capacity-low {
    background: linear-gradient(90deg, #228b22 0%, #32cd32 100%);
}

.capacity-medium {
    background: linear-gradient(90deg, #daa520 0%, #cd853f 100%);
}

.capacity-high {
    background: linear-gradient(90deg, #8b4513 0%, #a0522d 100%);
}

.capacity-full {
    background: linear-gradient(90deg, #654321 0%, #2f1b14 100%);
}

.no-event {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-event h3 {
    margin-bottom: 1rem;
}

.actions {
    text-align: center;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2d5016 0%, #8b4513 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s;
    margin: 0 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #228b22 0%, #32cd32 100%);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Form Styles (für register.php) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.checkbox-item:hover {
    background: #e9ecef;
}

.checkbox-item input[type="checkbox"],
.checkbox-item input[type="radio"] {
    margin-right: 0.5rem;
}

.checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    flex: 1;
}

.resource-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-left: 1.5rem;
}

.type-group {
    margin-bottom: 1rem;
}

.type-group h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #2d5016;
    font-weight: 600;
}

.no-resources {
    color: #6c757d;
    font-style: italic;
    margin: 0.5rem 0;
}

.day-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.day-group h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.required {
    color: #dc3545;
}

.capacity-info {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 1.5rem;
}

/* Register.php Container-Anpassung */
body:has(.card-body .form-group) .container {
    max-width: 800px;
}

/* Deaktivierte Ressourcen */
.checkbox-item.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.checkbox-item.disabled label {
    color: #6c757d;
    cursor: not-allowed;
}

.checkbox-item.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

/* Hinweis für deaktivierte Ressourcen */
.day-group .disabled-notice {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.day-group:not(.has-selected-day) .disabled-notice {
    display: block;
}

/* ==========================
   ADMIN STYLES
   ========================== */

/* Admin Header */
.admin-header {
    background: linear-gradient(135deg, #2d5016 0%, #8b4513 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-header .header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.admin-header .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Admin Container */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Admin Body */
body.admin-page {
    background-color: #f5f5f5;
}

/* Welcome Card */
.welcome-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-card h2 {
    color: #333;
    margin-bottom: 1rem;
}

.welcome-card p {
    color: #666;
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-grid .stat-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    text-align: center;
}

.stats-grid .stat-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stats-grid .stat-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

.stats-grid .stat-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.action-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.action-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

.action-card p {
    color: #666;
    margin-bottom: 1rem;
}

/* Button Variants */
.btn-primary {
    background: #2d5016;
    color: white;
}

.btn-primary:hover {
    background: #1a3009;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #8b4513;
    color: white;
}

.btn-secondary:hover {
    background: #654321;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Role Badges */
.badge-admin {
    background-color: #2d5016;
    color: white;
}

.badge-manager {
    background-color: #8b4513;
    color: white;
}

.badge-viewer {
    background-color: #654321;
    color: white;
}

/* Alert Variants */
.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    overflow-x: auto;
}

.table-container h2 {
    color: #333;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
}

table tbody tr:hover {
    background: #f8f9fa;
}

table td.email {
    font-family: monospace;
    font-size: 0.9rem;
}

table td.event-name {
    font-weight: 600;
    color: #2d5016;
}

table td.bookings {
    font-size: 0.9rem;
    max-width: 400px;
}

table td.bookings div {
    margin: 0.25rem 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-content h2 {
    color: #333;
    margin-bottom: 1.5rem;
}

.modal-content .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.modal-content .close:hover,
.modal-content .close:focus {
    color: #000;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Form Elements */
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: white;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    min-height: 100px;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-data h3 {
    margin-bottom: 1rem;
}

/* Resource Cards */
.resource-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.resource-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.resource-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.resource-card .resource-meta {
    font-size: 0.9rem;
    color: #666;
    margin: 0.25rem 0;
}

.resource-card .resource-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Event Cards */
.event-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.event-card .event-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-bottom: 2px solid #dee2e6;
}

.event-card .event-header h3 {
    color: #2d5016;
    margin: 0;
    font-size: 1.5rem;
}

.event-card .event-body {
    padding: 1.5rem;
}

.event-card .event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.event-card .event-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Participant Info */
.participant-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.participant-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.participant-info p {
    margin: 0.25rem 0;
    color: #666;
}

/* Confirmation Styles */
.success-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* ==========================
   LOGIN PAGE STYLES
   ========================== */

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.login-container .btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #2d5016 0%, #8b4513 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
    display: block;
}

.login-container .btn:hover {
    transform: translateY(-2px);
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.demo-info {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.demo-info h4 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.demo-info p {
    color: #333;
    margin-bottom: 0.25rem;
}

/* Resource Items (for events.php) */
.resource-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s;
}

.resource-item:hover {
    background: #e9ecef;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.resource-item.dragging {
    opacity: 0.5;
    background: #fff;
}

.resource-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resource-info strong {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.resource-info .badge {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.resource-info .available-dates {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.resource-info .available-dates small {
    color: #666;
    font-size: 0.85rem;
}

.resource-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.drag-handle {
    cursor: move;
    font-size: 1.2rem;
    color: #6c757d;
    padding: 0.5rem;
    user-select: none;
}

.drag-handle:hover {
    color: #2d5016;
}

.sort-actions {
    margin-top: 1rem;
    text-align: center;
    padding: 1rem;
    background: #e7f3ff;
    border-radius: 8px;
    border: 1px solid #b3d9ff;
}

/* Badge Info/Success variants for resources */
.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-primary {
    background-color: #007bff;
    color: white;
}

/* Meta display in event cards */
.event-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.meta-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.meta-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Reduced padding for mobile */
    .card-body {
        padding: 0.5rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    /* Admin adjustments */
    .admin-header .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-header .user-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        padding: 0.5rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .resource-item {
        flex-direction: column;
    }
    
    .resource-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .event-meta-grid {
        grid-template-columns: 1fr;
    }
    
    /* Hide resource type badge on mobile */
    .resources-table .badge {
        display: none;
    }
    
    /* Compact resource table for mobile */
    .resources-table th,
    .resources-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .resources-table th:nth-child(2),
    .resources-table td:nth-child(2) {
        display: none; /* Hide "Typ" column on mobile */
    }
    
    /* Compact day sections */
    .day-header {
        padding: 0.75rem;
    }
    
    .day-header h3 {
        font-size: 1rem;
    }
    
    .day-content {
        padding: 0.5rem;
    }
    
    /* Smaller stat cards */
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Compact actions */
    .actions {
        margin-top: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
