/* Fotowettbewerb Upload-Formular */

form.fw-form {
    text-align: left;
    max-width: 700px;
}

form.fw-form label {
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    margin-bottom: 0.25rem;
    display: block;
    color: #00437E;
}

form.fw-form .form-control {
    background-color: #ECF0F2 !important;
    color: #00437E !important;
    border-radius: 0 !important;
    border: none !important;
    height: 2.7rem;
    margin-top: 0.2rem;
    font-size: 1rem;
}

form.fw-form textarea.form-control {
    height: auto !important;
    min-height: 5rem;
    padding: 0.5rem 0.75rem;
    resize: vertical;
}

form.fw-form .form-control:focus {
    background-color: #e2e8ec !important;
    color: #00437E !important;
    box-shadow: 0 0 0 2px rgba(0, 67, 126, 0.25) !important;
}

form.fw-form .form-group {
    margin-bottom: 1rem;
}

/* Upload-Zone */
form.fw-form .fw-file-upload {
    position: relative !important;
    border: 2px dashed #9aa5ad !important;
    border-radius: 4px !important;
    padding: 2.5rem 2rem !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    background-color: #ECF0F2 !important;
    overflow: hidden;
}

form.fw-form .fw-file-upload:hover,
form.fw-form .fw-file-upload:focus,
form.fw-form .fw-file-upload.fw-dragover {
    border-color: #00437E !important;
    background-color: #e2e8ec !important;
    outline: none !important;
}

form.fw-form .fw-file-upload input[type="file"] {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 200px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

form.fw-form .fw-file-prompt {
    color: #00437E;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

form.fw-form .fw-file-prompt svg {
    opacity: 0.5;
}

form.fw-form .fw-file-prompt p {
    margin: 0.75rem 0 0.25rem;
    font-weight: bold;
    font-size: 1rem;
    color: #00437E;
}

form.fw-form .fw-file-prompt small {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Vorschau */
form.fw-form .fw-file-preview {
    position: relative;
    display: inline-block;
    z-index: 1;
}

form.fw-form .fw-file-preview img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

form.fw-form .fw-file-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50% !important;
    background: #00437E !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 0 !important;
    min-width: 0 !important;
}

form.fw-form .fw-file-remove:hover {
    background: #E1351F !important;
}

/* Submit-Button (Theme-konform: orangener Gradient) */
form.fw-form .fw-submit-btn {
    background: linear-gradient(135deg, #EF7C00, #e06c00) !important;
    color: #fff !important;
    border: none !important;
    height: 2.7rem;
    min-width: 12rem;
    padding: 0 2rem !important;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

form.fw-form .fw-submit-btn:hover {
    opacity: 0.85;
    background: linear-gradient(135deg, #EF7C00, #e06c00) !important;
    color: #fff !important;
}

form.fw-form .fw-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
form.fw-form .fw-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-top-color: #fff !important;
    border-radius: 50% !important;
    animation: fw-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
    background: none !important;
    padding: 0 !important;
}

@keyframes fw-spin {
    to { transform: rotate(360deg); }
}

/* Nachrichten */
form.fw-form .fw-messages {
    margin-bottom: 1rem;
}

form.fw-form .fw-msg-success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    font-size: 1rem;
}

.fw-form + .fw-msg-success,
form.fw-form .fw-msg-success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    font-size: 1rem;
}

form.fw-form .fw-msg-error {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Feld-Validierungsfehler */
form.fw-form .fw-invalid {
    box-shadow: 0 0 0 2px rgba(225, 53, 31, 0.4) !important;
}

form.fw-form .fw-file-upload.fw-invalid {
    border-color: rgba(225, 53, 31, 0.6) !important;
}

/* Checkbox (Theme-konform) */
form.fw-form .form-acceptance {
    margin-top: 1.25rem;
}

form.fw-form .form-acceptance label {
    font-size: 1rem;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
}

/* Responsive */
@media (max-width: 767px) {
    form.fw-form .fw-file-upload {
        padding: 1.5rem 1rem !important;
    }
}
