/**
 * Fahrzeug-Modal – ausschließlich Frontend (Shortcode).
 * Eigener Namespace hh-fz-* ohne Abhängigkeit von admin.css / Theme-Labels.
 */

.hh-fz-modal {
    --hh-fz-red: #cc0000;
    --hh-fz-red-dark: #990000;
    --hh-fz-bg: #f4f5f6;
    --hh-fz-surface: #ffffff;
    --hh-fz-border: #dcdcde;
    --hh-fz-text: #1d2327;
    --hh-fz-muted: #646970;
    --hh-fz-radius: 12px;
    --hh-fz-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);

    position: fixed;
    inset: 0;
    z-index: 100100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--hh-fz-text);
    line-height: 1.45;
}

.hh-fz-modal.is-open {
    display: flex;
}

.hh-fz-modal *,
.hh-fz-modal *::before,
.hh-fz-modal *::after {
    box-sizing: border-box;
}

.hh-fz-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.52);
    border: none;
    margin: 0;
    padding: 0;
}

.hh-fz-modal__panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: var(--hh-fz-surface);
    border-radius: var(--hh-fz-radius);
    box-shadow: var(--hh-fz-shadow);
    overflow: hidden;
    border: 1px solid var(--hh-fz-border);
}

.hh-fz-modal__panel::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--hh-fz-red), #e25555);
    flex-shrink: 0;
}

.hh-fz-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #ececec;
    background: var(--hh-fz-surface);
    margin: 0;
}

.hh-fz-modal__title-wrap {
    min-width: 0;
    flex: 1;
}

.hh-fz-modal__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hh-fz-red);
}

.hh-fz-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--hh-fz-text);
}

.hh-fz-modal__close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--hh-fz-border);
    border-radius: 8px;
    background: #fff;
    color: var(--hh-fz-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.hh-fz-modal__close:hover {
    border-color: var(--hh-fz-red);
    color: var(--hh-fz-red);
    background: #fff8f8;
}

.hh-fz-modal__form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.hh-fz-modal__body {
    padding: 16px 20px 18px;
    overflow-y: auto;
    background: var(--hh-fz-bg);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hh-fz-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    width: 100%;
    float: none;
}

.hh-fz-label {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hh-fz-muted);
    float: none;
    width: auto;
}

.hh-fz-input {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--hh-fz-border);
    border-radius: 8px;
    background: #fff;
    color: var(--hh-fz-text);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.4;
    float: none;
    appearance: auto;
    -webkit-appearance: auto;
    box-shadow: none;
    min-height: 42px;
}

.hh-fz-input--hero {
    font-size: 17px;
    font-weight: 600;
    padding: 12px 14px;
}

.hh-fz-input--area {
    min-height: 72px;
    resize: vertical;
}

.hh-fz-input:focus {
    outline: none;
    border-color: var(--hh-fz-red);
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.14);
}

.hh-fz-grid {
    display: grid;
    gap: 12px;
}

.hh-fz-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hh-fz-sum-box {
    padding: 14px 16px;
    border: 1px solid #f0c8c8;
    border-radius: 10px;
    background: linear-gradient(180deg, #fffafa 0%, #fff 100%);
}

.hh-fz-sum-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.hh-fz-sum-input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 26px;
    font-weight: 700;
    color: var(--hh-fz-text);
    font-family: inherit;
    line-height: 1.2;
    box-shadow: none;
    min-height: auto;
    appearance: textfield;
    -moz-appearance: textfield;
}

.hh-fz-sum-input::-webkit-outer-spin-button,
.hh-fz-sum-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hh-fz-sum-input:focus {
    outline: none;
    box-shadow: none;
}

.hh-fz-sum-unit {
    font-size: 20px;
    font-weight: 700;
    color: var(--hh-fz-red);
}

.hh-fz-input--status.hh-fz-status--geplant {
    border-left: 4px solid #2271b1;
    background: #f4f9fd;
}

.hh-fz-input--status.hh-fz-status--freigegeben {
    border-left: 4px solid #1e7e34;
    background: #f3faf4;
}

.hh-fz-input--status.hh-fz-status--bestellt {
    border-left: 4px solid #8a6d1d;
    background: #fffbf0;
}

.hh-fz-input--status.hh-fz-status--geliefert {
    border-left: 4px solid #646970;
    background: #f6f7f7;
}

.hh-fz-modal__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 14px 20px 16px;
    border-top: 1px solid #ececec;
    background: #fff;
    margin: 0;
}

.hh-fz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 20px;
    min-height: 42px;
    border-radius: 8px;
    border: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    box-shadow: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hh-fz-btn--ghost {
    background: #fff;
    border-color: var(--hh-fz-border);
    color: var(--hh-fz-text);
}

.hh-fz-btn--ghost:hover {
    border-color: #a7aaad;
    background: #f6f7f7;
}

.hh-fz-btn--primary {
    background: var(--hh-fz-red);
    border-color: var(--hh-fz-red);
    color: #fff;
}

.hh-fz-btn--primary:hover {
    background: var(--hh-fz-red-dark);
    border-color: var(--hh-fz-red-dark);
    color: #fff;
}

body.hh-fz-modal-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .hh-fz-modal {
        padding: 12px 10px;
        align-items: flex-end;
    }

    .hh-fz-modal__panel {
        max-height: calc(100vh - 24px);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .hh-fz-grid--2 {
        grid-template-columns: 1fr;
    }

    .hh-fz-modal__footer {
        flex-direction: column-reverse;
    }

    .hh-fz-btn {
        width: 100%;
    }
}
