/* Arcbay — Open Houses Studio (scoped strictly to #ohRoot, #ohModal, #ohQrModal) */

#ohRoot {
  --oh-line: rgba(8, 20, 31, .11);
  --oh-dim: #64748b;
  --oh-ink: #08141f;
  --oh-accent: var(--brand-primary, #0b2e63);
  --oh-on-accent: var(--brand-on-primary, #ffffff);
}

#ohRoot .oh-panel {
  background: #fff;
  border: 1px solid var(--oh-line);
  border-radius: 16px;
  padding: 22px 24px;
}

#ohRoot .oh-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

#ohRoot .oh-head h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--oh-ink);
  margin: 0;
  letter-spacing: -.015em;
}

#ohRoot .oh-head p {
  font-size: .88rem;
  color: var(--oh-dim);
  margin: 4px 0 0;
  max-width: 58ch;
}

#ohRoot .oh-head-acts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#ohRoot .oh-btn,
#ohModal .oh-btn,
#ohQrModal .oh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(8, 20, 31, .14);
  background: #fff;
  color: #08141f;
  font-family: inherit;
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, background .15s, opacity .15s;
}

#ohRoot .oh-btn:hover,
#ohModal .oh-btn:hover,
#ohQrModal .oh-btn:hover {
  border-color: var(--brand-primary, #0b2e63);
  background: #f8fafc;
}

#ohRoot .oh-btn:focus-visible,
#ohModal .oh-btn:focus-visible,
#ohQrModal .oh-btn:focus-visible {
  outline: 2px solid var(--brand-primary, #0b2e63);
  outline-offset: 2px;
}

#ohRoot .oh-btn.primary,
#ohModal .oh-btn.primary,
#ohQrModal .oh-btn.primary {
  background: var(--brand-primary, #0b2e63);
  border-color: transparent;
  color: var(--brand-on-primary, #ffffff);
}

#ohRoot .oh-btn.primary:hover,
#ohModal .oh-btn.primary:hover,
#ohQrModal .oh-btn.primary:hover {
  opacity: .92;
}

#ohRoot .oh-btn:disabled,
#ohModal .oh-btn:disabled {
  opacity: .5;
  cursor: default;
}

#ohRoot .oh-btn svg,
#ohModal .oh-btn svg,
#ohQrModal .oh-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

#ohRoot .oh-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px 20px;
  border-radius: 12px;
  border: 1px dashed rgba(8, 20, 31, .16);
  background: #f8fafc;
}

#ohRoot .oh-empty strong {
  font-size: .96rem;
  color: var(--oh-ink);
}

#ohRoot .oh-empty p {
  margin: 0;
  font-size: .86rem;
  color: var(--oh-dim);
  max-width: 56ch;
}

#ohRoot .oh-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#ohRoot .oh-card {
  border: 1px solid var(--oh-line);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s;
}

#ohRoot .oh-card.open {
  border-color: rgba(8, 20, 31, .24);
}

#ohRoot .oh-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  flex-wrap: wrap;
}

#ohRoot .oh-thumb {
  width: 68px;
  height: 50px;
  border-radius: 9px;
  overflow: hidden;
  flex: none;
  background: #f1f5f9;
  border: 1px solid rgba(8, 20, 31, .08);
  display: grid;
  place-items: center;
  color: #64748b;
}

#ohRoot .oh-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#ohRoot .oh-meta {
  flex: 1 1 220px;
  min-width: 0;
}

#ohRoot .oh-addr {
  font-weight: 700;
  font-size: .96rem;
  color: var(--oh-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ohRoot .oh-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: .82rem;
  color: var(--oh-dim);
}

#ohRoot .oh-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

#ohRoot .oh-count.has {
  background: rgba(31, 157, 107, .12);
  color: #166534;
}

#ohRoot .oh-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#ohRoot .oh-sheet {
  border-top: 1px solid var(--oh-line);
  background: #fafbfc;
  padding: 14px 16px;
}

#ohRoot .oh-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

#ohRoot .oh-sheet-head span {
  font-size: .82rem;
  color: var(--oh-dim);
  font-weight: 600;
}

#ohRoot .oh-sheet-table-wrap {
  overflow-x: auto;
}

#ohRoot .oh-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}

#ohRoot .oh-pill.hot { background: rgba(31, 157, 107, .13); color: #166534; }
#ohRoot .oh-pill.warm { background: rgba(11, 46, 99, .1); color: #0b2e63; }
#ohRoot .oh-pill.rep { background: rgba(217, 138, 31, .16); color: #92400e; }
#ohRoot .oh-pill.muted { background: #eef2f6; color: #475569; }

/* ---------------- New Open House Modal & QR Modal ---------------- */
#ohModal.oh-backdrop,
#ohQrModal.oh-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 20, 31, .52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#ohModal[hidden],
#ohQrModal[hidden] {
  display: none;
}

#ohModal .oh-dialog,
#ohQrModal .oh-dialog {
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 60px -20px rgba(8, 20, 31, .38);
  color: #08141f;
}

#ohQrModal .oh-dialog {
  max-width: 420px;
  text-align: center;
}

#ohModal .oh-dhead,
#ohQrModal .oh-dhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  text-align: left;
}

#ohModal .oh-dhead h3,
#ohQrModal .oh-dhead h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
}

#ohModal .oh-dhead p,
#ohQrModal .oh-dhead p {
  margin: 4px 0 0;
  font-size: .85rem;
  color: #64748b;
}

#ohModal .oh-x,
#ohQrModal .oh-x {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(8, 20, 31, .12);
  background: #fff;
  color: #334155;
  font-size: 1.1rem;
  cursor: pointer;
  flex: none;
}

#ohModal .oh-mode {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
  margin-bottom: 14px;
}

#ohModal .oh-mode button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: .84rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

#ohModal .oh-mode button.on {
  background: #fff;
  color: #08141f;
  box-shadow: 0 1px 3px rgba(8, 20, 31, .12);
}

#ohModal .oh-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
  margin-bottom: 16px;
}

#ohModal .oh-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1.5px solid rgba(8, 20, 31, .12);
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}

#ohModal .oh-pick:hover {
  border-color: rgba(8, 20, 31, .28);
  background: #f8fafc;
}

#ohModal .oh-pick.sel {
  border-color: var(--brand-primary, #0b2e63);
  background: rgba(11, 46, 99, .05);
}

#ohModal .oh-pick-thumb {
  width: 56px;
  height: 42px;
  border-radius: 7px;
  overflow: hidden;
  background: #f1f5f9;
  flex: none;
  display: grid;
  place-items: center;
  color: #64748b;
}

#ohModal .oh-pick-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#ohModal .oh-pick-info {
  flex: 1;
  min-width: 0;
}

#ohModal .oh-pick-info b {
  display: block;
  font-size: .9rem;
  color: #08141f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ohModal .oh-pick-info span {
  display: block;
  font-size: .78rem;
  color: #64748b;
  margin-top: 2px;
}

#ohModal .oh-pick-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(8, 20, 31, .22);
  display: grid;
  place-items: center;
  flex: none;
  color: transparent;
}

#ohModal .oh-pick.sel .oh-pick-check {
  background: var(--brand-primary, #0b2e63);
  border-color: transparent;
  color: var(--brand-on-primary, #fff);
}

#ohModal .oh-fld {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: #334155;
  margin: 0 0 6px;
}

#ohModal .oh-inp {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(8, 20, 31, .16);
  background: #fff;
  color: #08141f;
  font-family: inherit;
  font-size: .95rem;
}

#ohModal .oh-inp:focus {
  outline: none;
  border-color: var(--brand-primary, #0b2e63);
}

#ohModal .oh-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

#ohModal .oh-grid-3 {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

#ohModal .oh-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

#ohModal .oh-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(8, 20, 31, .14);
  background: #f8fafc;
  color: #334155;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}

#ohModal .oh-chip:hover {
  border-color: var(--brand-primary, #0b2e63);
  color: #08141f;
}

#ohModal .oh-err {
  color: #b91c1c;
  font-size: .84rem;
  font-weight: 600;
  min-height: 1.2em;
  margin: 6px 0 0;
}

#ohModal .oh-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(8, 20, 31, .1);
}

#ohQrModal .oh-qr-box {
  display: inline-flex;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(8, 20, 31, .12);
  border-radius: 14px;
  margin: 6px auto 16px;
}

#ohQrModal .oh-qr-url {
  font-size: .78rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid rgba(8, 20, 31, .1);
  border-radius: 9px;
  padding: 9px 12px;
  word-break: break-all;
  margin-bottom: 16px;
}

#ohQrModal .oh-qr-acts {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  #ohRoot .oh-panel { padding: 16px; }
  #ohModal .oh-grid-2,
  #ohModal .oh-grid-3 { grid-template-columns: 1fr; }
}
