/* PSI Case – Formular im anton-hipp.com-Design.
 *
 * Referenziert die Elementor-Kit-Globals (Kit 14) statt harter Marken-Hex,
 * damit Farben/Typografie automatisch dem Theme folgen. Fallback-Hex stehen
 * nur als Sicherheitsnetz dahinter. Schriften werden geerbt (Body = Raleway).
 *
 * Token-Mapping:
 *   Primary  #DB8F1B  --e-global-color-primary      (Buttons/Akzent)
 *   Dunkel   #3C3F44  --e-global-color-4d616352      (Headings/Text/Button-Kante)
 *   Grau     #6A6E75  --e-global-color-2f881a59      (Hinweise)
 *   Hellgrau #B8BDC6  --e-global-color-49437ec       (Rahmen)
 *   Weiss    #FFF     --e-global-color-6ed38690
 */

.psi-case-wrap {
    --psi-primary:  var(--e-global-color-primary, #DB8F1B);
    --psi-dark:     var(--e-global-color-4d616352, #3C3F44);
    --psi-gray:     var(--e-global-color-2f881a59, #6A6E75);
    --psi-border:   var(--e-global-color-49437ec, #B8BDC6);
    --psi-white:    var(--e-global-color-6ed38690, #FFF);
    --psi-shadow:   #C07605; /* harter Hover-Versatz wie Kit-Button */

    max-width: 820px;
    margin: 0 auto;
    color: var(--psi-dark);
    font-family: inherit; /* Body-Font (Raleway) erben */
}
.psi-case-wrap * { box-sizing: border-box; }

.psi-admin-note {
    background: #fff8e1; border: 1px solid #f0d264; padding: .75rem 1rem;
    border-radius: 4px; font-size: .9rem; margin-bottom: 1rem;
}

.psi-title {
    margin: 0 0 .35rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--psi-dark);
}
.psi-intro { margin: 0 0 1.75rem; line-height: 1.7; }

/* Abschnitte */
.psi-section {
    border: 1px solid var(--psi-border);
    padding: 1.25rem 1.5rem .5rem;
    margin: 0 0 1.25rem;
    background: var(--psi-white);
}
.psi-section > legend {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 1rem;
    padding: 0 .5rem;
    color: var(--psi-dark);
}

.psi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.psi-col-2 { grid-column: 1 / -1; }

.psi-field { display: flex; flex-direction: column; margin: 0 0 1.1rem; }
.psi-field label { font-weight: 500; margin-bottom: .4rem; font-size: .9rem; }

.psi-field input[type="text"],
.psi-field input[type="email"],
.psi-field input[type="tel"],
.psi-field input[type="date"],
.psi-field input[type="file"],
.psi-field textarea {
    width: 100%;
    padding: .7rem .8rem;
    border: 1px solid var(--psi-border);
    border-radius: 0;                /* eckig, wie Kit-Buttons */
    font: inherit;
    color: var(--psi-dark);
    background: var(--psi-white);
    transition: border-color .15s, box-shadow .15s;
}
.psi-field input:focus,
.psi-field textarea:focus {
    outline: none;
    border-color: var(--psi-primary);
    box-shadow: 0 0 0 2px rgba(219, 143, 27, .18);
}

.psi-req { color: var(--psi-primary); margin-left: 2px; }
.psi-hint { font-size: .82rem; color: var(--psi-gray); margin-top: .4rem; }

/* MDR-Block */
.psi-mdr p { font-size: .9rem; line-height: 1.6; }
.psi-check {
    display: flex; gap: .65rem; align-items: flex-start;
    margin: .65rem 0; font-size: .9rem; cursor: pointer; line-height: 1.5;
}
.psi-check input { margin-top: .25rem; flex: 0 0 auto; accent-color: var(--psi-primary); }

/* Button – Signatur des Kits nachgebildet */
.psi-actions { margin: .5rem 0 1rem; }
.psi-submit {
    appearance: none; cursor: pointer;
    display: inline-block;
    padding: 15px 30px 13px 24px;
    font: inherit;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--psi-white);
    background: var(--psi-primary);
    border: 0;
    border-left: 6px solid var(--psi-dark);
    border-radius: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, .5);
    transition: box-shadow .12s ease, transform .12s ease;
}
.psi-submit:hover:not(:disabled) {
    box-shadow: 4px 4px 0 0 var(--psi-shadow);
}
.psi-submit:disabled { opacity: .5; cursor: not-allowed; }

/* Fortschritt */
.psi-progress { margin-top: .75rem; }
.psi-progress-row { display: flex; align-items: center; gap: 10px; }
.psi-progress-track { position: relative; flex: 1; height: 14px; background: rgba(184, 189, 198, .34); overflow: hidden; }
.psi-progress-bar { height: 100%; width: 0; background: var(--psi-primary); transition: width .2s; }
.psi-spinner {
    flex: 0 0 auto; width: 18px; height: 18px;
    border: 3px solid rgba(184, 189, 198, .45); border-top-color: var(--psi-primary);
    border-radius: 50%; animation: psi-spin .8s linear infinite;
}
@keyframes psi-spin { to { transform: rotate(360deg); } }
.psi-progress-label { display: block; font-size: .8rem; margin-top: .35rem; color: var(--psi-gray); }
.psi-upload-warning {
    margin: .75rem 0 0; padding: .7rem .9rem;
    background: #fff4e0; border: 1px solid var(--psi-primary); border-left-width: 5px;
    font-size: .9rem; font-weight: 500; line-height: 1.45; color: var(--psi-dark);
}

/* Meldungen / Erfolg */
.psi-message { padding: .75rem 1rem; margin-top: 1rem; border: 1px solid var(--psi-border); }
.psi-message.is-error { background: #fdecea; border-color: #e6a8a0; color: #b03a2e; }
.psi-error { color: #b03a2e; font-weight: 600; }

.psi-success {
    border: 1px solid var(--psi-primary);
    border-left-width: 6px;
    background: #fff7ea;
    padding: 1.75rem; text-align: center;
}
.psi-success h2 { text-transform: uppercase; font-weight: 500; margin-top: 0; }
.psi-casenumber {
    font-size: 1.5rem; font-weight: 600; letter-spacing: .5px;
    margin: .5rem 0; color: var(--psi-primary);
}

@media (max-width: 640px) {
    .psi-grid { grid-template-columns: 1fr; }
    .psi-section { padding: 1rem 1rem .25rem; }
}
