/* Formular – portiert aus Kontaktformular-Referenz (scoped unter .thermico-jobs) */

.thermico-jobs-form-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
    max-width: 900px;
    font-family: 'Montserrat', sans-serif;
    align-items: start;
}

.thermico-jobs-field-full {
    grid-column: 1 / -1;
}

.thermico-jobs-form-group:not(.thermico-jobs-field-full) {
    display: grid;
    grid-template-rows: minmax(4.5em, auto) auto;
    align-content: start;
}

.thermico-jobs-form-group > label:first-child {
    display: block;
    font-weight: 600;
    color: #222;
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
    align-self: end;
}

.thermico-jobs-form-group .required {
    color: #c0392b;
}

.thermico-jobs-form-group input[type="text"],
.thermico-jobs-form-group input[type="email"],
.thermico-jobs-form-group input[type="tel"],
.thermico-jobs-form-group input[type="month"],
.thermico-jobs-form-group input[type="date"],
.thermico-jobs-form-group select,
.thermico-jobs-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    transition: border 0.3s, box-shadow 0.3s, background 0.3s;
    box-sizing: border-box;
    margin-top: 0;
    color: #222;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.thermico-jobs-form-group input:focus,
.thermico-jobs-form-group textarea:focus,
.thermico-jobs-form-group select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(8, 162, 87, 0.15);
    background: #fff;
}

.thermico-jobs-form-group input[readonly] {
    background: #f3f3f3;
    color: #555;
    cursor: default;
}

.thermico-jobs-form-group.is-invalid input,
.thermico-jobs-form-group.is-invalid select,
.thermico-jobs-form-group.is-invalid textarea {
    border-color: #c0392b;
}

.thermico-jobs-error-message {
    color: #721c24;
    font-size: 14px;
    margin-top: 6px;
}

.thermico-jobs-form-group--conditional {
    display: none;
}

.thermico-jobs-form-group--conditional.is-visible {
    display: grid;
    grid-template-rows: minmax(4.5em, auto) auto;
}

.thermico-jobs-form-group--conditional.is-visible.thermico-jobs-field-full {
    display: block;
    grid-template-rows: none;
}

/* Checkbox */
.thermico-jobs-checkbox-group input[type="checkbox"] {
    transform: scale(1.15);
    margin-right: 8px;
    accent-color: #08A257;
    width: auto;
    min-width: 18px;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.thermico-jobs-acceptance {
    margin-bottom: 0;
}

.thermico-jobs-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.thermico-jobs-checkbox-group label {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    font-weight: 400;
    margin: 0;
}

.thermico-jobs-checkbox-group label a {
    color: #222;
    font-weight: 600;
    text-decoration: underline;
}

/* Datei-Upload */
.thermico-jobs-file-upload {
    border: 1px solid #ddd;
    padding: 20px 20px 10px;
    border-radius: 12px;
    background-color: #fafafa;
    position: relative;
    margin-top: 4px;
}

.thermico-jobs-file-input {
    opacity: 0;
    position: absolute;
    z-index: -1;
    width: 0;
    height: 0;
    overflow: hidden;
}

.thermico-jobs-file-button {
    display: inline-block;
    padding: 12px 24px;
    background: #f0f0f0;
    color: #333;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    transition: background 0.3s ease, border-color 0.3s ease;
    border: 1px solid #ccc;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.thermico-jobs-file-button:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

.thermico-jobs-file-names {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #555;
    word-break: break-word;
}

.thermico-jobs-file-hint {
    font-size: 13px;
    color: #888;
    margin: 6px 0 0;
}

/* Buttons */
.thermico-jobs-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
    max-width: 900px;
}

.thermico-jobs-btn {
    display: inline-block;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.thermico-jobs-btn-primary {
    background: linear-gradient(to right, #08A257, #00426A);
    color: #fff;
    padding: 10px 24px;
    border: none;
    font-size: 14px;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    margin-top: 0;
    box-shadow: 0 0 10px rgba(0, 66, 106, 0.15);
}

.thermico-jobs-btn-primary:hover {
    opacity: 0.95;
    box-shadow: 0 0 10px rgba(0, 66, 106, 0.3);
    color: #fff;
}

.thermico-jobs-btn-secondary {
    background: transparent;
    color: #222;
    padding: 8px 18px;
    border: 1px solid #ddd;
    font-size: 14px;
    border-radius: 9999px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.thermico-jobs-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #222;
}

.thermico-jobs-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Meldungen */
.thermico-jobs-form-message {
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    font-size: 15px;
    max-width: 900px;
}

.thermico-jobs-form-message.is-success {
    background: #e6f5ea;
    color: #155724;
    border: 1px solid #b5dfc1;
}

.thermico-jobs-form-message.is-error {
    background: #fae5e5;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.thermico-jobs-success-panel h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #222;
}

.thermico-jobs-success-panel p {
    margin: 0;
    font-size: 15px;
    color: #555;
}

@media (max-width: 768px) {
    .thermico-jobs-form-fields {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .thermico-jobs-form-group:not(.thermico-jobs-field-full) {
        grid-template-rows: auto auto;
    }

    .thermico-jobs-form-group > label:first-child {
        align-self: start;
    }

    .thermico-jobs-form-group--conditional.is-visible {
        grid-template-rows: auto auto;
    }

    .thermico-jobs-form-actions {
        flex-direction: column;
    }

    .thermico-jobs-btn-primary,
    .thermico-jobs-btn-secondary {
        width: 100%;
    }
}
