/* ============================================================================
   Reelty — create, map, compare, campaigns, notifications, usage
   ========================================================================== */

/* ── Create / publish ─────────────────────────────────────────────────────── */
.create { padding: 46px 0 80px; }
.createform { margin-top: 8px; }
.modeswitch { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.modeswitch__btn { padding: 12px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); font-weight: 700; transition: .2s; }
.modeswitch__btn:hover { color: var(--text); }
.modeswitch__btn.is-active { background: var(--grad-soft); border-color: var(--brand-2); color: var(--brand-2); }

.uploader { margin-bottom: 18px; }
.uploader__drop { display: grid; place-items: center; gap: 6px; padding: 44px 20px; border-radius: 18px; border: 2px dashed var(--line-2); background: var(--surface); text-align: center; cursor: pointer; transition: .2s; }
.uploader__drop:hover, .uploader__drop.is-over { border-color: var(--brand-2); background: var(--surface-2); }
.uploader__icon { font-size: 2rem; }
.uploader__drop span { color: var(--muted-2); font-size: .85rem; }
.uploader__preview { position: relative; border-radius: 18px; overflow: hidden; background: var(--media-bg); aspect-ratio: 16/9; max-height: 360px; display: grid; place-items: center; }
.uploader__preview video { width: 100%; height: 100%; object-fit: contain; }
.uploader__change { position: absolute; top: 12px; right: 12px; padding: 7px 14px; border-radius: 999px; background: rgba(0,0,0,.5); border: 1px solid var(--line-2); color: #fff; font-weight: 600; font-size: .82rem; }
.uploader__bar { position: absolute; left: 16px; right: 16px; bottom: 40px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.uploader__bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.uploader__status { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 600; font-size: .85rem; }
.uploader__status--ok { color: #6fe9b6; }
.uploader__status--error { color: #ff8a98; }

.grid-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 4px; }
.grid-fields > div { display: grid; gap: 4px; }
.grid-fields .field { height: 50px; }
.grid-fields .field input, .grid-fields .field select { width: 100%; }

.amenpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.amenpick__chip { position: relative; cursor: pointer; }
.amenpick__chip input { position: absolute; opacity: 0; }
.amenpick__chip span { display: block; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); font-size: .85rem; font-weight: 600; transition: .2s; }
.amenpick__chip input:checked + span, .amenpick__chip.is-on span { background: var(--grad-soft); border-color: var(--brand-2); color: var(--brand-2); }
.amenpick__empty { color: var(--muted-2); font-size: .85rem; }

.caption-head { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.toggles { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 4px; }

/* Per-mode field sections + project configurations */
.modeblock[hidden] { display: none; }
.modeblock .grid-fields { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.field-help { color: var(--muted-2); font-size: .82rem; margin: 2px 0 8px; }

.logoupload { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.logoupload__preview { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-2); flex: 0 0 auto; }
.logoupload__preview img { width: 100%; height: 100%; object-fit: cover; }
.logoupload__status { font-size: .82rem; font-weight: 600; color: var(--muted); }
.logoupload__status--ok { color: #6fe9b6; }
.logoupload__status--error { color: #ff8a98; }

.config-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.configrow { border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; margin: 10px 0; background: var(--surface); }
.configrow__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.configrow__title { font-family: var(--display); font-size: .95rem; }
.configrow__remove { width: 30px; height: 30px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); font-size: 1.2rem; line-height: 1; }
.configrow__remove:hover { color: #ff8a98; border-color: #ff8a98; }
.configrow__status { display: inline-block; margin-left: 10px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.configrow__status--ok { color: #6fe9b6; }
.configrow__status--error { color: #ff8a98; }
[data-subtype-wrap][hidden], [data-beds-wrap][hidden], [data-baths-wrap][hidden],
[data-cfg-subtype-wrap][hidden], [data-cfg-beds-wrap][hidden], [data-cfg-baths-wrap][hidden],
[data-completion-wrap][hidden] { display: none; }

.autocomplete { position: relative; }
.autocomplete__list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--surface); backdrop-filter: blur(14px); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; }
.autocomplete__opt { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-size: .9rem; }
.autocomplete__opt:hover { background: var(--soft); color: var(--text); }

/* ── Map search ───────────────────────────────────────────────────────────── */
.mapsearch { display: grid; grid-template-columns: 380px 1fr; height: calc(100vh - 72px); }
.mapsearch__panel { padding: 24px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-2); }
.mapsearch__head h1 { font-size: 1.5rem; margin-top: 6px; }
.mapsearch__filters { display: grid; gap: 10px; margin: 18px 0; }
.mapsearch__filters .field { height: 46px; }
.mapsearch__count { color: var(--muted); font-size: .85rem; margin-bottom: 14px; font-weight: 600; }
.mapsearch__list { display: grid; gap: 10px; }
.maprow { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: .2s; }
.maprow:hover { border-color: var(--brand-2); transform: translateX(3px); }
.maprow__badge { font-size: .68rem; font-weight: 700; color: var(--brand-2); text-transform: uppercase; letter-spacing: .06em; }
.maprow strong { font-family: var(--display); }
.maprow small { color: var(--muted-2); font-size: .8rem; }
.mapsearch__map { height: 100%; background: var(--surface-2); }
.mappin__dot { display: block; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.leaflet-popup-content-wrapper { background: var(--surface-2); color: var(--text); border-radius: 14px; }
.leaflet-popup-tip { background: var(--surface-2); }
.mappop { display: grid; gap: 2px; min-width: 160px; }
.mappop strong { font-family: var(--display); font-size: 1.1rem; }
.mappop small { color: var(--muted); }
.mappop a { color: var(--brand-2); font-weight: 700; margin-top: 6px; }

/* ── Compare ──────────────────────────────────────────────────────────────── */
.card__compare { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.6); color: var(--brand); transition: .2s; box-shadow: 0 4px 12px -6px rgba(0,0,0,.4); }
.card__compare:hover { background: #fff; }
.card__compare.is-on { background: var(--grad); border-color: transparent; }
.card:has(.card__badge--feat) .card__compare { top: 50px; }

.comparebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; background: var(--glass); backdrop-filter: blur(18px); border-top: 1px solid var(--line-2); padding: 12px 0; box-shadow: 0 -10px 40px -22px rgba(40,28,90,.4); }
.comparebar__inner { display: flex; align-items: center; gap: 16px; }
.comparebar__count { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.comparebar__count strong { color: var(--text); }
.comparebar__items { display: flex; gap: 8px; flex: 1; overflow-x: auto; }
.comparebar__chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: .82rem; white-space: nowrap; }
.comparebar__chip button { color: var(--muted); font-size: 1rem; line-height: 1; }
.comparebar__chip button:hover { color: var(--text); }
.comparebar__actions { display: flex; gap: 8px; }

.comparewrap { overflow-x: auto; }
.comparetable { width: 100%; border-collapse: collapse; min-width: 600px; }
.comparetable th, .comparetable td { padding: 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.comparetable thead th { width: 220px; }
.comparetable tbody td:first-child { color: var(--muted-2); font-weight: 600; font-size: .85rem; width: 120px; }
.comparetable td.strong { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.comparehead { display: grid; gap: 8px; }
.comparehead__media { display: block; aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: var(--media-bg); }
.comparehead__media video { width: 100%; height: 100%; object-fit: cover; }
.comparehead__ph { display: grid; place-items: center; height: 100%; background: var(--grad); color: #fff; font-family: var(--display); font-size: 2rem; }
.comparerm { color: var(--muted-2); font-size: .8rem; text-decoration: underline; margin-top: 4px; }
.comparerm:hover { color: #ff8a98; }

/* ── Usage / campaigns ────────────────────────────────────────────────────── */
.usagebar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.usagebar__item { flex: 1; min-width: 120px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.usagebar__n { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 800; }
.usagebar__l { color: var(--muted-2); font-size: .76rem; }
.usagebar__item--rec { border-color: var(--brand-2); background: var(--grad-soft); }
.usagebar__item--rec .usagebar__n { color: var(--brand-2); }

.campaigns { display: grid; gap: 16px; }
.campaign { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.campaign__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.campaign__head small { display: block; color: var(--muted-2); font-size: .8rem; }
.campaign__perf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.campaign__perf > div { padding: 12px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.campaign__n { display: block; font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.campaign__l { color: var(--muted-2); font-size: .72rem; }
.campaign__controls { display: grid; gap: 4px; }
.campaign__controls .field { height: 44px; margin-bottom: 4px; }
.campaign__controls .field input { width: 100%; }
.campaign__save { margin-top: 10px; width: fit-content; }

/* ── Notifications ────────────────────────────────────────────────────────── */
.notif { position: relative; }
.nav__bell { position: relative; }
.notif__badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .66rem; font-weight: 800; display: grid; place-items: center; }
.notif__drop { position: absolute; right: 0; top: calc(100% + 10px); width: 320px; border-radius: 16px; background: var(--surface); backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s var(--ease); overflow: hidden; }
.notif.is-open .notif__drop { opacity: 1; visibility: visible; transform: none; }
.notif__head { padding: 14px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.notif__items { max-height: 340px; overflow-y: auto; }
.notif__empty { padding: 24px 16px; text-align: center; color: var(--muted-2); font-size: .88rem; }
.notif__item { display: grid; grid-template-columns: 12px 1fr; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif__item strong { font-size: .9rem; }
.notif__item p { color: var(--muted); font-size: .82rem; margin: 2px 0; }
.notif__item small { color: var(--muted-2); font-size: .74rem; }
.notif__dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--brand-2); }
.notif__item--error .notif__dot { background: #ff7a88; }
.notif__item--warn .notif__dot { background: #ffc266; }
.notif__all { display: block; padding: 13px 16px; text-align: center; color: var(--brand-2); font-weight: 700; font-size: .88rem; }
.notif__all:hover { background: var(--soft); }
.notif__h { font-size: 1.1rem; margin: 26px 0 14px; }
.savedsearch { margin-bottom: 24px; }
.savedsearch__hint { color: var(--muted); font-size: .85rem; margin-bottom: 12px; }

@media (max-width: 980px) {
    .mapsearch { grid-template-columns: 1fr; height: auto; }
    .mapsearch__panel { border-right: none; border-bottom: 1px solid var(--line); max-height: none; }
    .mapsearch__map { height: 60vh; }
    .grid-fields { grid-template-columns: 1fr 1fr; }
    .campaign__perf { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .grid-fields { grid-template-columns: 1fr 1fr; }
    .comparebar__inner { flex-wrap: wrap; }
}
