/**
 * Tanzschule Verträge - Frontend Styles
 */

/* Formular Wrapper */
.tanzvertrag-formular-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.tanzvertrag-title {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2em;
}

/* Formular */
.tanzvertrag-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Fieldsets */
.tanzvertrag-fieldset {
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.tanzvertrag-fieldset legend {
    font-weight: 700;
    color: #2c3e50;
    padding: 0 10px;
    font-size: 1.1em;
}

/* Form Rows */
.tanzvertrag-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Fields */
.tanzvertrag-field {
    margin-bottom: 20px;
}

.tanzvertrag-field--half {
    flex: 1 1 calc(50% - 10px);
    min-width: 250px;
}

.tanzvertrag-field--third {
    flex: 1 1 calc(33.333% - 13px);
    min-width: 120px;
}

.tanzvertrag-field--two-thirds {
    flex: 2 1 calc(66.666% - 7px);
    min-width: 200px;
}

.tanzvertrag-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.tanzvertrag-field input[type="text"],
.tanzvertrag-field input[type="email"],
.tanzvertrag-field input[type="tel"],
.tanzvertrag-field input[type="date"],
.tanzvertrag-field input[type="url"],
.tanzvertrag-field select,
.tanzvertrag-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.tanzvertrag-field input:focus,
.tanzvertrag-field select:focus,
.tanzvertrag-field textarea:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

/* Required indicator */
.required {
    color: #e74c3c;
}

/* Descriptions */
.description,
.tanzvertrag-field small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.875em;
}

/* Checkbox Fields */
.tanzvertrag-field--checkbox {
    margin-bottom: 15px;
}

.tanzvertrag-field--checkbox label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    cursor: pointer;
}

.tanzvertrag-field--checkbox input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 4px;
    cursor: pointer;
}

/* Notices */
.tanzvertrag-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.tanzvertrag-notice--info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.tanzvertrag-notice--warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.tanzvertrag-notice--error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* Price Display */
.tanzvertrag-price-display {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.tanzvertrag-price-display h3 {
    margin-top: 0;
    color: #2c3e50;
}

.price-info {
    margin-top: 15px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.price-row:last-child {
    border-bottom: none;
}

.price-row strong {
    color: #2c3e50;
    font-size: 1.1em;
}

/* Submit Button */
.tanzvertrag-submit-wrapper {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e4e8;
}

.tanzvertrag-submit-button {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tanzvertrag-submit-button:hover {
    background-color: #1a252f;
}

.tanzvertrag-submit-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.tanzvertrag-submit-info {
    margin-top: 10px;
    color: #6b7280;
    font-size: 0.9em;
}

/* Error Messages */
.tanzvertrag-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Success Page */
.tanzvertrag-success-wrapper {
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
}

.tanzvertrag-success {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tanzvertrag-success h2 {
    color: #27ae60;
    margin-bottom: 20px;
    font-size: 2em;
}

.tanzvertrag-success .lead {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 30px;
}

.mitgliedsnummer-box {
    background-color: #f8f9fa;
    border: 2px solid #27ae60;
    border-radius: 6px;
    padding: 20px;
    margin: 30px 0;
}

.mitgliedsnummer {
    font-size: 1.8em;
    color: #2c3e50;
    font-family: monospace;
    letter-spacing: 2px;
}

.next-steps {
    text-align: left;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.next-steps h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.next-steps ol {
    margin: 0;
    padding-left: 20px;
}

.next-steps li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.success-actions {
    margin-top: 30px;
}

.success-actions .button {
    display: inline-block;
    padding: 12px 30px;
    margin: 0 10px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.success-actions .button-primary {
    background-color: #2c3e50;
    color: white;
}

.success-actions .button-primary:hover {
    background-color: #1a252f;
}

.success-actions .button {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.success-actions .button:hover {
    background-color: #d5dbdb;
}

/* Email Check */
.email-check-result {
    margin-top: 5px;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9em;
}

.email-check-result.exists {
    background-color: #e3f2fd;
    color: #1565c0;
}

.email-check-result.new {
    background-color: #e8f5e9;
    color: #2e7d32;
}

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

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .tanzvertrag-formular-wrapper {
        padding: 10px;
    }
    
    .tanzvertrag-form {
        padding: 20px;
    }
    
    .tanzvertrag-row {
        flex-direction: column;
    }
    
    .tanzvertrag-field--half,
    .tanzvertrag-field--third,
    .tanzvertrag-field--two-thirds {
        flex: 1 1 100%;
    }
    
    .price-row {
        flex-direction: column;
        text-align: left;
    }
    
    .price-row strong {
        margin-top: 5px;
    }
}