/*
 * Owner pages for listing a home (resources/views/frontend/host/homes/).
 * Site tokens with fallbacks; 6px corners on cards, controls and buttons.
 */

.hh-page {
    --hh-green: #7bd444;
    --hh-green-ink: #14300a;
    --hh-border: var(--vnz-border, #ececec);
    --hh-muted: var(--vnz-muted, #6b7280);
    --hh-ink: var(--vnz-ink, #111);
    --hh-radius: 6px;
    background: var(--vnz-bg-soft, #faf9f5);
    color: var(--vnz-text, #222831);
    padding: 36px 0 80px;
}
.hh-wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.hh-page h1 { font-family: var(--vnz-serif, inherit); font-size: 32px; line-height: 1.2; margin: 0 0 10px; color: var(--hh-ink); }
.hh-page h2 { font-family: var(--vnz-serif, inherit); font-size: 21px; margin: 0 0 6px; color: var(--hh-ink); }
.hh-page h3 { font-size: 15px; margin: 0 0 8px; color: var(--hh-ink); }
.hh-lede { font-size: 17px; line-height: 1.55; margin: 0 0 22px; }
.hh-muted { color: var(--hh-muted); }
.hh-hint { display: block; font-size: 13px; color: var(--hh-muted); font-weight: 400; margin-top: 4px; line-height: 1.4; }

.hh-card { background: #fff; border: 1px solid var(--hh-border); border-radius: var(--hh-radius); padding: 24px; margin-bottom: 18px; }
.hh-card > p:last-child { margin-bottom: 0; }

.hh-steps { margin: 0; padding-left: 22px; line-height: 1.8; font-size: 15px; }
.hh-list { margin: 0; padding-left: 20px; line-height: 1.7; font-size: 15px; }

.hh-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px; border: 0; border-radius: var(--hh-radius);
    background: var(--hh-green); color: var(--hh-green-ink); font-size: 16px; font-weight: 700;
    text-decoration: none; cursor: pointer; text-align: center;
}
.hh-btn:hover,
.hh-btn:focus-visible { filter: brightness(.94); color: var(--hh-green-ink); text-decoration: none; }
.hh-btn:focus-visible { outline: 2px solid var(--hh-ink); outline-offset: 2px; }
.hh-btn--quiet { background: #fff; color: var(--hh-ink); border: 1px solid #c9ccd1; font-weight: 600; }
.hh-btn--quiet:hover,
.hh-btn--quiet:focus-visible { background: #f4f4f2; color: var(--hh-ink); filter: none; }
.hh-btn--small { min-height: 38px; padding: 8px 12px; font-size: 14px; }
.hh-btn--danger { background: #fff; color: #7a1219; border: 1px solid #b4232c; font-weight: 600; }
.hh-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }

.hh-notice { border: 1px solid var(--hh-border); border-left: 4px solid #2f5b15; border-radius: var(--hh-radius); background: #fff; padding: 14px 16px; margin-bottom: 18px; font-size: 15px; }
.hh-notice--warn { border-left-color: #b26a00; }
.hh-notice--error { border-left-color: #b4232c; }
.hh-notice ul { margin: 6px 0 0; padding-left: 20px; }

/* ---- List of homes ---- */
.hh-home { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.hh-status { display: inline-block; padding: 3px 9px; border-radius: var(--hh-radius); background: #eef0f2; font-size: 13px; font-weight: 700; color: var(--hh-ink); }
.hh-status--live { background: #e3f5d6; color: #1d4410; }
.hh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The go-live steps under an approved home (staff only). */
.hh-golive { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--hh-muted, #6b7280); }
.hh-golive li.is-done { color: #1d4410; font-weight: 600; }

/* Each home's Actions menu: a <details> disclosure with a dropdown panel.
   Variables carry fallbacks because the list also renders inside the
   operator workspace, which does not set the .hh-page tokens. */
.hh-menu { position: relative; }
.hh-menu > summary { list-style: none; gap: 6px; user-select: none; }
.hh-menu > summary::-webkit-details-marker { display: none; }
.hh-menu__caret { font-size: 11px; transition: transform .15s; }
.hh-menu[open] .hh-menu__caret { transform: rotate(180deg); }
.hh-menu__panel {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 250px; padding: 6px;
    background: #fff; border: 1px solid var(--hh-border, #ececec); border-radius: var(--hh-radius, 6px);
    box-shadow: 0 10px 28px rgba(17, 17, 17, .12);
}
.hh-menu__panel form { margin: 0; }
.hh-menu__item {
    display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--hh-radius, 6px); background: none;
    color: var(--hh-ink, #111); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.35; text-align: left; text-decoration: none; cursor: pointer;
}
.hh-menu__item:hover,
.hh-menu__item:focus-visible { background: #f4f4f2; color: var(--hh-ink, #111); text-decoration: none; }
.hh-menu__item:focus-visible { outline: 2px solid var(--hh-ink, #111); outline-offset: -2px; }
.hh-menu__item--go { color: #1d4410; }
.hh-menu__item--danger { color: #7a1219; }
.hh-menu__item--danger:hover,
.hh-menu__item--danger:focus-visible { background: #fbeceb; color: #7a1219; }
@media (max-width: 640px) {
    /* The menu wraps under the home's name on a phone, at the left edge. */
    .hh-menu__panel { left: 0; right: auto; max-width: calc(100vw - 40px); }
}
.hh-menu__label { margin: 6px 0 2px; padding: 6px 12px 2px; border-top: 1px solid var(--hh-border, #ececec); font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--hh-muted, #6b7280); }

/* ---- Form ---- */
.hh-field { margin-bottom: 16px; }
.hh-field label,
.hh-label { display: block; font-size: 14px; font-weight: 600; color: var(--hh-ink); margin-bottom: 5px; }
.hh-field input[type="text"],
.hh-field input[type="number"],
.hh-field input[type="date"],
.hh-field input[type="time"],
.hh-field input[type="tel"],
.hh-field input[type="file"],
.hh-field select,
.hh-field textarea,
.hh-row input,
.hh-row select {
    width: 100%; min-height: 44px; padding: 9px 11px; font-size: 16px;
    border: 1px solid #c9ccd1; border-radius: var(--hh-radius); background: #fff; color: var(--hh-ink);
}
.hh-field textarea { min-height: 110px; line-height: 1.5; }
.hh-field input:focus-visible,
.hh-field select:focus-visible,
.hh-field textarea:focus-visible,
.hh-row input:focus-visible,
.hh-row select:focus-visible { outline: 2px solid #2f5b15; outline-offset: 1px; }
.hh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.hh-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.hh-checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 15px; margin: 0; min-height: 32px; }
.hh-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 400; }
.hh-check input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }

.hh-space { border: 1px solid var(--hh-border); border-radius: var(--hh-radius); padding: 16px; margin-bottom: 12px; background: #fcfcfb; }
.hh-row { display: grid; grid-template-columns: 2fr 1fr 1.4fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.hh-row--fee { grid-template-columns: 1.2fr 1.4fr 1fr 1.6fr auto; }
.hh-row--block { grid-template-columns: 1fr 1fr auto; }
.hh-row label { font-size: 13px; font-weight: 400; margin: 0; display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }

.hh-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.hh-photos figure { margin: 0; }
.hh-photos img { width: 100%; height: 100px; object-fit: cover; border-radius: var(--hh-radius); display: block; }
.hh-photos label { font-size: 13px; font-weight: 400; display: flex; gap: 6px; align-items: center; margin-top: 4px; }

.hh-preview { font-size: 16px; font-weight: 600; color: var(--hh-ink); margin: 0; }

@media (max-width: 640px) {
    .hh-page { padding-top: 22px; }
    .hh-page h1 { font-size: 26px; }
    .hh-card { padding: 18px 16px; }
    .hh-row,
    .hh-row--fee,
    .hh-row--block { grid-template-columns: 1fr 1fr; }
    .hh-btn { width: 100%; }
    .hh-btn--small { width: auto; }
}

/* ---- Managing an approved home (manage/_form, manage/_change) ---- */
.hm-table-wrap { overflow-x: auto; border: 1px solid var(--hh-border); border-radius: var(--hh-radius); margin-bottom: 8px; }
.hm-table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.hm-table th,
.hm-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hh-border); }
.hm-table thead th { font-size: 13px; font-weight: 700; color: var(--hh-muted); background: #fcfcfb; }
.hm-table tbody tr:last-child th,
.hm-table tbody tr:last-child td { border-bottom: 0; }
.hm-table tbody th { font-weight: 600; color: var(--hh-ink); }
.hm-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; margin: 0; min-height: 32px; }
.hm-inline input { width: 18px; height: 18px; }
.hm-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hm-compare > div { border: 1px solid var(--hh-border); border-radius: var(--hh-radius); padding: 12px 14px; background: #fcfcfb; }
.hm-compare .hh-label { margin-bottom: 6px; }

/* The same form inside the admin layout: no page background or page width. */
.hh-page--embed { background: transparent; padding: 0 0 40px; }
.hh-page--embed .hh-wrap { max-width: 980px; margin: 0; padding: 0; }
.hh-page--embed h2 { font-size: 19px; }

@media (max-width: 640px) {
    .hm-compare { grid-template-columns: 1fr; }
    .hm-table { font-size: 14px; }
    .hm-table th,
    .hm-table td { padding: 8px 10px; }
}

/* Host sign-up (/host/join), 2026-12-02 */
.hh-wrap--narrow { max-width: 620px; }
.hh-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hh-field .hh-choice__option { display: flex; gap: 10px; align-items: center; padding: 14px; border: 1px solid #d6dccf; border-radius: 6px; cursor: pointer; }
.hh-field .hh-choice__option:has(input:checked) { border-color: #72bf44; background: #f1f8ec; }
/* Only the join page's email and password fields; the home form's email field is unchanged. */
#host-join-form .hh-field input[type="email"],
#host-join-form .hh-field input[type="password"] {
    width: 100%; min-height: 44px; padding: 9px 11px; font-size: 16px;
    border: 1px solid #c9ccd1; border-radius: var(--hh-radius); background: #fff; color: var(--hh-ink);
}
#host-join-form .hh-field input[type="email"]:focus-visible,
#host-join-form .hh-field input[type="password"]:focus-visible { outline: 2px solid #2f5b15; outline-offset: 1px; }
.hh-password { display: flex; gap: 8px; }
.hh-password input { flex: 1; }
.hh-field .hh-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin: 0; }
.hh-error { color: #b3261e; font-size: 14px; display: block; margin-top: 4px; }
@media (max-width: 560px) { .hh-choice { grid-template-columns: 1fr; } }
