/* ==========================================================================
   Netzdienste Kontaktformular – Styles
   ========================================================================== */

:root {
    --nd-primary: #1a5276;
    --nd-primary-light: #2980b9;
    --nd-primary-dark: #0e3d5a;
    --nd-accent: #27ae60;
    --nd-accent-hover: #219a52;
    --nd-danger: #e74c3c;
    --nd-warning: #f39c12;
    --nd-bg: #f8f9fa;
    --nd-white: #ffffff;
    --nd-gray-100: #f1f3f5;
    --nd-gray-200: #e9ecef;
    --nd-gray-300: #dee2e6;
    --nd-gray-500: #adb5bd;
    --nd-gray-700: #495057;
    --nd-gray-900: #212529;
    --nd-radius: 8px;
    --nd-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --nd-transition: all 0.25s ease;
}

.nd-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
    color: var(--nd-gray-900);
    line-height: 1.6;
}

/* ---------- Kategorie-Auswahl ---------- */

.nd-step-category h3 {
    font-size: 1.6em;
    margin-bottom: 0.3em;
    color: var(--nd-primary);
    text-align: center;
}

.nd-subtitle {
    text-align: center;
    color: var(--nd-gray-700);
    margin-bottom: 1.5em;
    font-size: 1em;
}

.nd-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.nd-cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--nd-white);
    border: 2px solid var(--nd-gray-200);
    border-radius: var(--nd-radius);
    cursor: pointer;
    transition: var(--nd-transition);
    text-align: center;
    font-family: inherit;
}

.nd-cat-btn:hover,
.nd-cat-btn:focus {
    border-color: var(--nd-primary-light);
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.15);
    transform: translateY(-2px);
}

.nd-cat-icon {
    font-size: 2em;
    margin-bottom: 8px;
    line-height: 1;
}

.nd-cat-title {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--nd-primary);
    margin-bottom: 4px;
}

.nd-cat-desc {
    font-size: 0.8em;
    color: var(--nd-gray-700);
    line-height: 1.3;
}

/* ---------- Formular-Header ---------- */

.nd-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--nd-gray-200);
}

.nd-back-btn {
    background: none;
    border: 1px solid var(--nd-gray-300);
    padding: 6px 14px;
    border-radius: var(--nd-radius);
    cursor: pointer;
    color: var(--nd-gray-700);
    font-size: 0.9em;
    font-family: inherit;
    transition: var(--nd-transition);
}

.nd-back-btn:hover {
    background: var(--nd-gray-100);
    border-color: var(--nd-primary-light);
    color: var(--nd-primary);
}

.nd-selected-category {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--nd-primary);
}

/* ---------- Fieldsets ---------- */

.nd-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.nd-fieldset legend {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--nd-primary);
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--nd-gray-200);
    width: 100%;
}

/* ---------- Felder ---------- */

.nd-field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.nd-two-col > .nd-field {
    flex: 1;
}

.nd-field {
    margin-bottom: 16px;
}

.nd-field label {
    display: block;
    font-weight: 500;
    font-size: 0.9em;
    margin-bottom: 5px;
    color: var(--nd-gray-700);
}

.nd-required {
    color: var(--nd-danger);
}

.nd-field input[type="text"],
.nd-field input[type="email"],
.nd-field input[type="tel"],
.nd-field input[type="url"],
.nd-field select,
.nd-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--nd-gray-300);
    border-radius: var(--nd-radius);
    font-size: 0.95em;
    font-family: inherit;
    transition: var(--nd-transition);
    background: var(--nd-white);
    box-sizing: border-box;
    color: var(--nd-gray-900);
}

.nd-field input:focus,
.nd-field select:focus,
.nd-field textarea:focus {
    outline: none;
    border-color: var(--nd-primary-light);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.15);
}

.nd-field input.nd-invalid,
.nd-field textarea.nd-invalid {
    border-color: var(--nd-danger);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.nd-field textarea {
    resize: vertical;
    min-height: 120px;
}

.nd-field input[type="file"] {
    padding: 8px;
    font-size: 0.9em;
}

/* ---------- Hint ---------- */

.nd-hint {
    background: #eaf6ff;
    border-left: 4px solid var(--nd-primary-light);
    padding: 12px 16px;
    border-radius: 0 var(--nd-radius) var(--nd-radius) 0;
    font-size: 0.88em;
    color: var(--nd-gray-700);
    margin-bottom: 16px;
}

/* ---------- Checkboxen ---------- */

.nd-checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.nd-checkbox-field input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--nd-primary);
}

.nd-checkbox-field label {
    font-size: 0.88em;
    color: var(--nd-gray-700);
    cursor: pointer;
    line-height: 1.4;
}

.nd-checkbox-field a {
    color: var(--nd-primary-light);
    text-decoration: underline;
}

/* ---------- Submit ---------- */

.nd-form-actions {
    margin-top: 24px;
    text-align: center;
}

.nd-submit-btn {
    background: var(--nd-accent);
    color: var(--nd-white);
    border: none;
    padding: 14px 40px;
    font-size: 1.05em;
    font-weight: 600;
    border-radius: var(--nd-radius);
    cursor: pointer;
    transition: var(--nd-transition);
    font-family: inherit;
    letter-spacing: 0.3px;
}

.nd-submit-btn:hover:not(:disabled) {
    background: var(--nd-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

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

/* ---------- Erfolg / Fehler ---------- */

.nd-success-box,
.nd-error-box {
    text-align: center;
    padding: 40px 20px;
    border-radius: var(--nd-radius);
}

.nd-success-box {
    background: #eafaf1;
    border: 1px solid #a9dfbf;
}

.nd-error-box {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
}

.nd-success-icon,
.nd-error-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.nd-success-box h3 {
    color: var(--nd-accent);
    font-size: 1.4em;
}

.nd-error-box h3 {
    color: var(--nd-danger);
    font-size: 1.4em;
}

.nd-ticket-info {
    background: var(--nd-white);
    display: inline-block;
    padding: 8px 24px;
    border-radius: var(--nd-radius);
    border: 1px solid var(--nd-gray-200);
    margin: 12px 0;
    font-size: 1.05em;
}

.nd-new-request-btn,
.nd-retry-btn {
    margin-top: 16px;
    padding: 10px 28px;
    border: 2px solid var(--nd-primary);
    background: var(--nd-white);
    color: var(--nd-primary);
    border-radius: var(--nd-radius);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: var(--nd-transition);
}

.nd-new-request-btn:hover,
.nd-retry-btn:hover {
    background: var(--nd-primary);
    color: var(--nd-white);
}

/* ---------- Error-Liste ---------- */

.nd-error-list {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: var(--nd-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.9em;
}

.nd-error-list ul {
    margin: 6px 0 0 18px;
    color: var(--nd-danger);
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    .nd-field-row.nd-two-col {
        flex-direction: column;
        gap: 0;
    }

    .nd-category-grid {
        grid-template-columns: 1fr;
    }

    .nd-cat-btn {
        flex-direction: row;
        text-align: left;
        gap: 12px;
    }

    .nd-cat-icon {
        font-size: 1.5em;
        margin-bottom: 0;
    }

    .nd-submit-btn {
        width: 100%;
    }
}
