/*
 * Swiss Immoo Mieterportal – Formularstil.
 * Ruhig, mobile-first und abgestimmt auf das Design-Polish-Plugin
 * (Blau #004aad, Textfarbe #101828, Flächen #f5f6f8, Systemschrift).
 */

.sip-shell {
    --sip-blue: #004aad;
    --sip-blue-dark: #003a88;
    --sip-ink: #101828;
    --sip-muted: #667085;
    --sip-line: rgba(16, 24, 40, .1);
    --sip-soft: #f5f6f8;
    --sip-radius: 18px;
    max-width: 760px;
    margin: 0 auto 64px;
    color: var(--sip-ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.sip-shell *,
.sip-shell *::before,
.sip-shell *::after {
    box-sizing: border-box;
}

/* Einleitung */
.sip-intro {
    padding: 4px 2px 22px;
}

.sip-kicker {
    margin: 0 0 6px;
    color: var(--sip-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.sip-shell h2 {
    margin: 0;
    color: var(--sip-ink);
    font-size: clamp(26px, 4.5vw, 34px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.sip-lead {
    max-width: 58ch;
    margin: 12px 0 0;
    color: var(--sip-muted);
}

.sip-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.sip-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    border-radius: 999px;
    background: var(--sip-soft);
    color: var(--sip-muted);
    font-size: 13px;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease;
}

.sip-steps li > span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    color: var(--sip-muted);
    font-size: 12px;
    font-weight: 700;
}

.sip-steps li.is-active {
    background: var(--sip-blue);
    color: #fff;
}

.sip-steps li.is-active > span {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.sip-steps li.is-done {
    background: #e8f2ec;
    color: #176342;
}

.sip-steps li.is-done > span {
    color: #176342;
}

/* Hinweise */
.sip-alert {
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid #f0d9a8;
    border-radius: 14px;
    background: #fffaef;
    color: #6b5015;
    font-size: 14px;
}

.sip-message {
    margin: 0 0 18px;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
}

.sip-message--success,
.sip-notice--info {
    border: 1px solid #bfe3d1;
    background: #eef8f2;
    color: #176342;
}

.sip-message--error {
    border: 1px solid #f2c7c1;
    background: #fdf1ef;
    color: #a33127;
}

.sip-message--info {
    border: 1px solid var(--sip-line);
    background: var(--sip-soft);
    color: var(--sip-ink);
}

.sip-notice {
    padding: 16px 20px;
    border-radius: 14px;
}

.sip-inline-note {
    margin: -6px 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7ed;
    color: #8a4b0f;
    font-size: 14px;
}

/* Karten */
.sip-card {
    padding: 26px;
    border: 1px solid var(--sip-line);
    border-radius: var(--sip-radius);
    background: #fff;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .05);
}

.sip-card + .sip-card {
    margin-top: 18px;
}

.sip-card h3 {
    margin: 0 0 6px;
    color: var(--sip-ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.sip-hint {
    margin: 0 0 20px;
    color: var(--sip-muted);
    font-size: 14px;
}

/* Felder */
.sip-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.sip-field {
    display: block;
    margin-bottom: 16px;
}

.sip-field > span {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
}

.sip-field > span em {
    color: var(--sip-blue);
    font-style: normal;
}

.sip-field > span small {
    color: var(--sip-muted);
    font-weight: 400;
}

.sip-field input,
.sip-field select,
.sip-field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    color: var(--sip-ink);
    font: inherit;
    outline: 0;
    transition: border-color .18s ease, box-shadow .18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.sip-field select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667085' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
}

.sip-field textarea {
    min-height: 132px;
    resize: vertical;
}

.sip-field input:focus,
.sip-field select:focus,
.sip-field textarea:focus {
    border-color: var(--sip-blue);
    box-shadow: 0 0 0 4px rgba(0, 74, 173, .12);
}

.sip-field small {
    display: block;
    margin-top: 6px;
    color: var(--sip-muted);
    font-size: 13px;
}

.sip-field--code input {
    max-width: 220px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .32em;
    text-align: center;
}

.sip-field.is-invalid input,
.sip-field.is-invalid select,
.sip-field.is-invalid textarea {
    border-color: #d4574a;
    box-shadow: 0 0 0 4px rgba(212, 87, 74, .1);
}

/* Fotos */
.sip-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 130px;
    padding: 18px;
    border: 1.5px dashed #b6bfcc;
    border-radius: 14px;
    background: var(--sip-soft);
    color: var(--sip-muted);
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}

.sip-upload:hover {
    border-color: var(--sip-blue);
}

.sip-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.sip-upload strong {
    color: var(--sip-blue);
    font-size: 16px;
}

.sip-files {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.sip-files li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--sip-soft);
    font-size: 13px;
}

.sip-files img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 auto;
}

.sip-files .sip-file-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sip-files .sip-file-size {
    color: var(--sip-muted);
}

.sip-files button {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(16, 24, 40, .08);
    color: var(--sip-ink);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.sip-files button:hover {
    background: rgba(16, 24, 40, .16);
}

/* Einwilligung */
.sip-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 4px 0 22px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--sip-soft);
    color: #344054;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.sip-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--sip-blue);
}

.sip-check em {
    color: var(--sip-blue);
    font-style: normal;
}

.sip-check.is-invalid {
    outline: 2px solid #d4574a;
    outline-offset: 2px;
}

/* Knöpfe */
.sip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.sip-button {
    min-height: 50px;
    padding: 12px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--sip-blue);
    color: #fff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 74, 173, .2);
    transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sip-button:hover:not([disabled]) {
    background: var(--sip-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 74, 173, .26);
}

.sip-button[disabled] {
    opacity: .55;
    cursor: default;
    box-shadow: none;
}

.sip-button--ghost {
    background: transparent;
    color: var(--sip-blue);
    box-shadow: none;
}

.sip-button--ghost:hover:not([disabled]) {
    background: rgba(0, 74, 173, .08);
    color: var(--sip-blue-dark);
    transform: none;
    box-shadow: none;
}

/* Abschluss */
.sip-card--done {
    border-top: 3px solid var(--sip-blue);
    text-align: center;
}

.sip-report-number {
    margin: 18px 0 4px;
    font-size: 15px;
    color: var(--sip-muted);
}

.sip-report-number strong {
    display: inline-block;
    margin-left: 6px;
    padding: 6px 14px;
    border-radius: 10px;
    background: var(--sip-soft);
    color: var(--sip-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 17px;
    letter-spacing: .06em;
}

/* Honigtopf */
.sip-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Ab Tablet zweispaltig */
@media (min-width: 620px) {
    .sip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sip-card {
        padding: 32px;
    }
}

@media (max-width: 480px) {
    .sip-shell {
        font-size: 16px;
    }

    .sip-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .sip-button {
        width: 100%;
    }

    .sip-actions .sip-button {
        width: 100%;
    }
}

/* ------------------------------------------------------------------ */
/* Online-Anmeldung (Shortcode [swiss_immoo_anmeldung])                 */
/* Nutzt bewusst dieselben .sip-* Bausteine; hier stehen nur die drei   */
/* Ergänzungen, die das längere Formular braucht.                       */
/* ------------------------------------------------------------------ */

.sia-section {
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sip-line, #e4e7ec);
    color: #344054;
    font-size: 15px;
    font-weight: 600;
}

.sia-section:first-of-type {
    margin-top: 6px;
}

/* Ein Ja/Nein-Haken ist kein Einwilligungsblock: ruhiger und ohne Fläche. */
.sip-check.sia-check {
    margin: 0 0 16px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--sip-line, #e4e7ec);
    border-radius: 10px;
}

@media (min-width: 620px) {
    .sip-grid > .sia-field--wide {
        grid-column: 1 / -1;
    }
}
