/* public_html/css/event_form.css */

.event-form-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 25px 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.event-form-container h1 {
    text-align: center;
    color: #333;
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 2em;
    border-bottom: 2px solid #e03a3c; /* Akzentfarbe */
    padding-bottom: 10px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fdfdfd;
}

.form-section legend {
    font-size: 1.3em;
    font-weight: 500;
    color: #e03a3c; /* Akzentfarbe */
    padding: 0 10px;
    margin-bottom: 20px; /* Mehr Abstand unter der Legende */
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 0.95em;
}
/* Standard Input Felder */
.form-group input[type="text"],
.form-group input[type="datetime-local"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #e03a3c; /* Akzentfarbe */
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(224, 58, 60, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select[multiple] {
    min-height: 120px; 
    padding: 10px; 
}
.form-group select option {
    padding: 5px;
}

.input-hint {
    display: block;
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 5px;
}

span.required {
    color: #e03a3c;
    margin-left: 2px;
}

/* Verbesserter File Input / Dropzone Bereich */
.file-upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border: 2px dashed #adb5bd; /* Helleres Grau für den Rand */
    border-radius: 8px;
    background-color: #f8f9fa; /* Sehr heller Hintergrund */
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-align: center;
    min-height: 150px; /* Mehr Höhe */
}
.file-upload-dropzone:hover,
.file-upload-dropzone.is-dragging { /* Klasse für Drag-Feedback */
    background-color: #e9ecef; /* Etwas dunkler im Hover/Drag */
    border-color: #e03a3c; /* Akzentfarbe */
}
.file-upload-dropzone.has-files { /* Wenn Dateien ausgewählt sind */
    border-style: solid;
    border-color: #a0d2a0; /* Grüner Rand bei Erfolg/Auswahl */
    background-color: #f0fff0;
}

.dropzone-icon svg {
    width: 48px;
    height: 48px;
    color: #e03a3c; /* Akzentfarbe für Icon */
    margin-bottom: 15px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.file-upload-dropzone:hover .dropzone-icon svg,
.file-upload-dropzone.is-dragging .dropzone-icon svg {
    opacity: 1;
}

.dropzone-text {
    font-size: 1.1em;
    color: #495057;
    font-weight: 500;
    margin-bottom: 8px;
}
.dropzone-text span { /* "klicken zum Auswählen" */
    color: #e03a3c;
    font-weight: 700;
    text-decoration: underline;
}
.dropzone-hint {
    font-size: 0.85em;
    color: #6c757d;
}

.visually-hidden { 
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#file_names_display_container {
    font-size: 0.9em;
    color: #333;
}
.file-names-list {
    list-style-type: none;
    padding-left: 0;
    margin-top: 5px;
    font-size: 0.85em;
    color: #555;
}
.file-names-list li {
    padding: 3px 0;
    border-bottom: 1px dotted #eee;
}
.file-names-list li:last-child {
    border-bottom: none;
}


.photo-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* Mehr Abstand */
    margin-top: 20px; /* Mehr Abstand nach oben */
    padding: 15px; /* Mehr Padding */
    border: 1px solid #e0e0e0; /* Solider Rand */
    border-radius: 8px; /* Abgerundete Ecken */
    background-color: #fdfdfd; 
    min-height: 100px; 
}

.photo-preview-item {
    width: 110px; /* Etwas größer */
    height: 110px;
    border-radius: 6px; /* Abgerundete Ecken */
    overflow: hidden;
    border: 1px solid #dee2e6;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08); /* Weicherer Schatten */
    position: relative; /* Für den Remove-Button */
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Verhindert Leerraum unter dem Bild */
}
.preview-remove-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    background-color: rgba(220, 53, 69, 0.8); /* Rot mit Transparenz */
    color: white;
    border: none;
    border-radius: 50%; /* Rund */
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 22px; /* Zentriert das X */
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.preview-remove-btn:hover {
    background-color: #dc3545; /* Vollrot im Hover */
}


/* Stile für Foto-Management im Edit-Modus */
.photo-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.photo-manage-item-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.photo-background-container {
    position: relative;
    width: 100%;
    padding-top: 75%; 
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.photo-delete-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    z-index: 10; 
}
.photo-details-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.photo-details-area .caption-input {
    font-size: 0.85em;
    padding: 8px 10px;
    min-height: 40px;
}
.important-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}
.important-photo-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.important-label {
    font-size: 0.8em;
    color: #333;
    cursor: pointer;
    user-select: none;
}


.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end; 
    gap: 10px; 
}
.form-actions.delete-section {
    justify-content: flex-start; 
    border-top: none;
    padding-top: 0;
    margin-top: 20px;
}

.btn {
    display: inline-flex; 
    align-items: center;
    gap: 8px; 
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.07);
}
.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-primary {
    background-color: #e03a3c; 
    color: white;
}
.btn-primary:hover {
    background-color: #c73032;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.btn-secondary {
    background-color: #6c757d;
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
}
.btn-danger {
    background-color: #dc3545;
    color: white;
}
.btn-danger:hover {
    background-color: #c82333;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1055; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    width: 90%;
    max-width: 500px;
}
.modal-content h4 {
    margin-top: 0;
    color: #333;
    font-size: 1.4em;
    margin-bottom: 15px;
}
.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #495057;
}
.modal-actions {
    margin-top: 20px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}
.close-button:hover {
    color: #333;
}

@media (max-width: 768px) {
    .event-form-container {
        margin: 20px;
        padding: 20px;
    }
    .event-form-container h1 {
        font-size: 1.8em;
    }
    .form-section legend {
        font-size: 1.15em;
    }
    .form-actions {
        flex-direction: column;
    }
    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    .form-actions .btn:last-child {
        margin-bottom: 0;
    }
    .form-actions.delete-section .btn {
        width: auto; 
    }
    .file-upload-dropzone {
        padding: 20px 15px;
        min-height: 120px;
    }
    .dropzone-icon svg {
        width: 36px;
        height: 36px;
        margin-bottom: 10px;
    }
    .dropzone-text {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .event-form-container {
        margin: 10px;
        padding: 15px;
    }
     .event-form-container h1 {
        font-size: 1.6em;
    }
    .form-group input[type="text"],
    .form-group input[type="datetime-local"],
    .form-group input[type="password"],
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.95em;
    }
    .btn {
        font-size: 0.95em;
        padding: 8px 15px;
    }
    .photo-preview-item {
        width: 80px;
        height: 80px;
    }
    .file-upload-dropzone {
        min-height: 100px;
    }
     .dropzone-icon svg {
        width: 30px;
        height: 30px;
    }
    .dropzone-text {
        font-size: 0.9em;
    }
}

