/* Schulanmeldung Plugin Styles */

.schulanmeldung-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.schulanmeldung-header {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    margin-bottom: 0;
    position: relative;
}

.language-selector {
    position: absolute;
    top: 15px;
    right: 20px;
}

.language-dropdown {
    background: rgba(255, 255, 255, 0.95);
    color: #003366;
    border: 2px solid white;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.language-dropdown:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.language-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.schulanmeldung-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 600;
}

.schulanmeldung-header .description {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

.schulanmeldung-form {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

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

.form-section h3 {
    color: #003366;
    font-size: 22px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: 400 !important;
    cursor: pointer;
    line-height: 1.5;
}

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

.checkbox-label.required {
    font-weight: 500 !important;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

/* Signature Pad */
.signature-pad {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    padding: 10px;
}

#signature-canvas {
    width: 100%;
    height: 200px;
    background: white;
    border-radius: 4px;
    cursor: crosshair;
    touch-action: none;
}

#clear-signature {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

#clear-signature:hover {
    background: #c82333;
}

/* Buttons */
.button-primary {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    width: 100%;
    max-width: 400px;
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

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

.button-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.button-secondary {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.button-secondary:hover {
    background: #5a6268;
}

/* Messages */
#form-messages,
#code-validation-message {
    margin: 15px 0;
    padding: 15px;
    border-radius: 6px;
    font-size: 15px;
}

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

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

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

.form-note {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #0066cc;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

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

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .schulanmeldung-container {
        padding: 0 15px;
    }

    .schulanmeldung-header {
        padding: 30px 20px;
    }

    .schulanmeldung-header h2 {
        font-size: 24px;
    }

    .schulanmeldung-form {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }

    .form-section h3 {
        font-size: 20px;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }

    .button-primary {
        max-width: 100%;
    }

    #signature-canvas {
        height: 150px;
    }
}

/* Validation States */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #28a745;
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* Print Styles */
@media print {
    .schulanmeldung-header {
        background: white;
        color: black;
        border: 2px solid black;
    }

    .button-primary,
    .button-secondary {
        display: none;
    }
}

/* Upload Styles */
.file-upload {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: #0066cc;
    background: #f0f7ff;
}

.file-upload:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.upload-info-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.upload-info-box h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 16px;
}

.upload-info-box p {
    margin: 10px 0;
    color: #856404;
}

.upload-info-box ul {
    margin: 10px 0 0 20px;
    color: #856404;
}

.upload-info-box li {
    margin: 5px 0;
}

#upload-preview {
    margin-top: 10px;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 4px;
    display: none;
}

#upload-preview.active {
    display: block;
}

#upload-preview .file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#upload-preview .file-icon {
    font-size: 24px;
}

#upload-preview .file-name {
    flex: 1;
    font-weight: 600;
    color: #003366;
}

#upload-preview .file-size {
    color: #666;
    font-size: 13px;
}

#upload-preview .remove-file {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

#upload-preview .remove-file:hover {
    background: #c82333;
}

.checkbox-important input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.checkbox-important strong {
    color: #d32f2f;
}

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

.checkbox-primary strong {
    color: #0066cc;
}

.radio-hauptansprechpartner {
    cursor: pointer;
}

.upload-info-required {
    background: #ffebee;
    border-color: #d32f2f;
}

.upload-info-required h4 {
    color: #c62828;
}

.upload-info-required p,
.upload-info-required ul,
.upload-info-required li {
    color: #c62828;
}

/* Signature Upload Styles */
.signature-option {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.signature-option p {
    margin: 0 0 10px 0;
}

.signature-upload {
    width: 100%;
    padding: 10px;
    border: 2px dashed #3498db;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.signature-upload:hover {
    border-color: #2980b9;
    background: #f0f8ff;
}

.signature-preview {
    margin-top: 15px;
    text-align: center;
}

.signature-preview img {
    max-width: 300px;
    max-height: 150px;
    border: 2px solid #27ae60;
    padding: 5px;
    background: #fff;
    border-radius: 4px;
}

.signature-preview .remove-preview {
    display: block;
    margin: 10px auto 0;
    padding: 5px 15px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.signature-preview .remove-preview:hover {
    background: #c0392b;
}
