/* ---------------------------------------------------------
   amenities.css — Apartment-Ausstattungsverwaltung (Nayax-Stil)
   Klassen mit am- präfixiert.
--------------------------------------------------------- */

/* ── Page header ──────────────────────────────────────── */
.am-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.am-head__text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
    border-left: 3px solid var(--brand);
    padding-left: 12px;
    line-height: 1.2;
}
.am-head__text p {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 3px;
    padding-left: 15px;
}

/* ── Apartment selector bar ───────────────────────────── */
.am-select-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
}
.am-select-bar label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-soft);
    flex-shrink: 0;
}
.am-select-bar select {
    flex: 1;
    max-width: 340px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}
.am-select-bar select:focus { border-color: var(--brand); }

/* ── Board: stacked groups ────────────────────────────── */
.am-board {
    display: grid;
    gap: 16px;
    padding-bottom: 90px;
}

/* ── Group card ───────────────────────────────────────── */
.am-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.am-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}
.am-group__head h2 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.am-group__count {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-soft);
    padding: 2px 9px;
    line-height: 1.4;
}
.am-group__active-count {
    background: var(--brand-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-deep);
    padding: 2px 9px;
    line-height: 1.4;
    display: none;
}
.am-group__active-count.is-visible { display: inline-block; }

/* ── Grid of amenity items ────────────────────────────── */
.am-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--border-soft);
}

.am-item {
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    background: var(--surface);
    transition: background .12s;
    position: relative;
    user-select: none;
}
.am-item:hover { background: var(--bg-soft); }
.am-item.is-active {
    background: #FFFBEB;
}
.am-item input[type="checkbox"] { display: none; }

/* Icon circle */
.am-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .12s, border-color .12s;
}
.am-item__icon i {
    font-size: 17px;
    color: var(--text-mute);
    transition: color .12s;
}
.am-item.is-active .am-item__icon {
    background: var(--brand-soft);
    border-color: transparent;
}
.am-item.is-active .am-item__icon i { color: var(--brand-deep); }

/* Check mark overlay (top-right) */
.am-item__check {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1.5px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, border-color .12s;
}
.am-item__check i {
    font-size: 10px;
    color: transparent;
    transition: color .12s;
}
.am-item.is-active .am-item__check {
    background: #10B981;
    border-color: #10B981;
}
.am-item.is-active .am-item__check i { color: #fff; }

/* Text body */
.am-item__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-right: 22px;
}
.am-item__body strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}
.am-item__body small {
    font-size: 11px;
    color: var(--text-mute);
    font-family: 'Outfit', ui-monospace, monospace;
}

/* Text value input (for non-boolean amenities) */
.am-item__value {
    display: block;
    margin-top: 8px;
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--bg);
    font: inherit;
    font-size: 12.5px;
    color: var(--text);
    outline: none;
    transition: border-color .15s;
}
.am-item__value:focus { border-color: var(--brand); }

/* ── Sticky save bar ──────────────────────────────────── */
.am-savebar {
    position: sticky;
    bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    z-index: 10;
}
.am-savebar__info {
    font-size: 12.5px;
    color: var(--text-soft);
}
.am-savebar__info strong {
    color: var(--text);
    font-weight: 600;
}

/* ── Alert ────────────────────────────────────────────── */
.am-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 16px;
}
.am-alert--ok {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #047857;
}
.am-alert--error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
    .am-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .am-grid { grid-template-columns: 1fr; }
    .am-select-bar select { max-width: 100%; }
}
