/**
 * Stylesheet für Veranstaltungsformular
 * Naturpark Erzgebirge-Vogtland
 * Design-Inspiration: Natur, Wald, Nachhaltigkeit
 */

:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c2c;
    --light-green: #8fbc5a;
    --earth-brown: #6b4423;
    --light-brown: #a67c52;
    --sky-blue: #7ba8c9;
    --text-dark: #2c3e20;
    --text-gray: #555;
    --bg-light: #f8f9f5;
    --border-color: #d4d9cd;
    --error-red: #c92a2a;
    --success-green: #2f9e44;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f8f9f5 0%, #e8ede3 100%);
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: 2rem 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo {
    height: 80px;
    width: auto;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 0.5rem;
}

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

/* Card */
.card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 8px 24px rgba(45, 80, 22, 0.1);
    margin-bottom: 2rem;
}

.intro-text {
    background: var(--bg-light);
    border-left: 4px solid var(--secondary-green);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
}

.intro-text h2 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.intro-text ul {
    margin-left: 1.5rem;
    color: var(--text-gray);
}

.intro-text li {
    margin: 0.5rem 0;
}

/* Form */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bg-light);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-green);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.5rem;
    background: var(--light-green);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.required::after {
    content: ' *';
    color: var(--error-red);
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 44, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: var(--error-red);
    font-weight: 600;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232d5016' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Checkbox Group Styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background-color: #e9ecef;
    transform: translateX(2px);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 15px;
    color: #495057;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.file-upload-label:hover {
    background: var(--light-green);
    color: white;
    border-color: var(--light-green);
}

.file-upload-label::before {
    content: '📎 ';
    font-size: 1.2rem;
}

.file-name {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    font-style: italic;
}

/* Help Text */
.help-text {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
    font-style: italic;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-green) 0%, var(--primary-green) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 124, 44, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 124, 44, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

/* Messages */
.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    gap: 1rem;
}

.message-success {
    background: #d3f9d8;
    border-left: 4px solid var(--success-green);
    color: #2f9e44;
}

.message-error {
    background: #ffe0e0;
    border-left: 4px solid var(--error-red);
    color: var(--error-red);
}

.message-info {
    background: #d0ebff;
    border-left: 4px solid var(--sky-blue);
    color: #1864ab;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.footer a {
    color: var(--secondary-green);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid var(--bg-light);
    border-top: 3px solid var(--secondary-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin Panel */
.admin-header {
    background: var(--earth-brown);
    color: white;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--earth-brown);
    color: white;
}

.btn-secondary:hover {
    background: var(--light-brown);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--primary-green);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr:hover {
    background: var(--bg-light);
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .logo {
        height: 60px;
    }
}

/* Print Styles */
@media print {
    .btn, .file-upload-label {
        display: none;
    }

    body {
        background: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
