/* Explore pages: the global globe, review, admin, groups and settings. Uses the tokens of app.css. */

/* ---------------------------------------------------------------- the global globe */
.global-page { position: fixed; inset: 0; overflow: hidden; background: #03060c; }
.global-page .global-map { position: absolute; inset: 0; }
/* numbers on the far side of the globe: hidden, not ghosted through the Earth */
.global-page .maplibregl-marker-covered { opacity: 0 !important; pointer-events: none; }
.global-page .maplibregl-ctrl-top-right { top: calc(var(--topbar) + 8px); }
.global-page .maplibregl-ctrl-bottom-left { left: 8px; bottom: 6px; }
.global-page .maplibregl-ctrl-group { background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.global-page .maplibregl-ctrl-group button + button { border-top-color: var(--line); }
.global-page .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(0.9); }
:root[data-theme="light"] .global-page .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: none; }
.global-page .ps-relief-btn { color: var(--text) !important; }
.global-page .maplibregl-ctrl-scale { background: rgba(10, 16, 24, 0.55); color: #dfe8f2; border-color: #dfe8f2; }

.global-head { left: 14px; top: calc(var(--topbar) + 12px); width: min(360px, calc(100vw - 28px)); padding: 14px 14px 12px; }
.global-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.global-head h1 { font-size: 24px; margin: 0; }
.global-head-actions { flex-wrap: nowrap; gap: 4px; }
.global-status { color: var(--text-dim); font-size: 13px; margin-top: 2px; min-height: 20px; }
.global-hint { color: var(--text-faint); font-size: 12.5px; margin-top: 8px; }

.place-search { position: relative; margin-top: 10px; }
.place-search > svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.place-search input { padding-left: 34px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 12; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 5px; max-height: 320px; overflow: auto; }
.search-item { display: flex; gap: 9px; align-items: flex-start; width: 100%; text-align: left; padding: 7px 9px; border: 0; background: none;
  color: var(--text); border-radius: var(--radius-sm); cursor: pointer; font: inherit; }
.search-item:hover, .search-item:focus-visible { background: var(--bg-hover); }
.search-item svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--accent); }
.search-item span { display: flex; flex-direction: column; line-height: 1.3; }
.search-item .dim { font-size: 12.5px; }
.search-empty { padding: 8px 10px; font-size: 13px; }

.global-legend { left: 50%; transform: translateX(-50%); bottom: 18px; display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  font-size: 13px; color: var(--text-dim); flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); }
.legend-dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(228, 87, 46, 0.92); border: 2px solid #fff; flex: none; }
.legend-dot.pending { background: rgba(255, 255, 255, 0.9); border: 2px dashed #ff9f1c; margin-left: 6px; }
.global-legend .chip { margin-left: 6px; padding: 4px 10px; }

.global-intro { left: 14px; bottom: 74px; width: min(400px, calc(100vw - 28px)); padding: 20px 22px 16px; animation: intro-in 0.6s ease-out;
  background: linear-gradient(160deg, rgba(20, 31, 46, 0.86), rgba(12, 19, 29, 0.78)); }
:root[data-theme="light"] .global-intro { background: var(--glass); }
.intro-kicker { display: flex; align-items: center; gap: 7px; font: 600 13px var(--font-display); color: var(--accent); letter-spacing: 0.4px; margin-bottom: 6px; }
.intro-kicker svg { width: 20px; height: 20px; }
.global-intro h2 { font: 600 27px/1.15 var(--font-display); margin: 0 0 8px; }
.global-intro p { color: var(--text-dim); }
.intro-points { list-style: none; padding: 0; margin: 4px 0 16px; display: grid; gap: 7px; font-size: 14px; }
.intro-points li { display: flex; gap: 9px; align-items: flex-start; }
.intro-points svg { width: 17px; height: 17px; flex: none; color: var(--glacier); margin-top: 2px; }
.global-intro .hint { margin: 10px 0 0; }
@keyframes intro-in { from { opacity: 0; transform: translateY(14px); } }

.global-empty { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 28px)); text-align: center; padding: 24px; }
.global-empty > svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 6px; }
.global-empty p { color: var(--text-dim); }

.global-panel { bottom: auto; max-height: calc(100% - var(--topbar) - 20px); }
.global-page.panel-open .maplibregl-ctrl-top-right { right: min(450px, calc(100vw - 10px)); }
.global-panel .panel-head { align-items: flex-start; }
.global-panel .panel-head .small { font-size: 12.5px; }
.global-panel .panel-head .btn.ghost { padding-left: 6px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.panel-actions { margin-bottom: 12px; }
.global-panel .photo-grid .thumb { border: 0; padding: 0; }
.global-panel .photo-grid .thumb.pending-thumb { outline: 2px dashed var(--pending); outline-offset: -2px; }
.viewer-photo .viewer-flag { position: absolute; left: 10px; top: 10px; }
.viewer-owner { margin-top: 8px; font-size: 13.5px; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.viewer-owner svg { width: 14px; height: 14px; }
.viewer-meta .where { display: flex; gap: 4px; align-items: center; }
.viewer-meta .where svg { width: 14px; height: 14px; flex: none; }
.viewer-actions { margin: 10px 0 4px; }
.review-note { margin-top: 10px; }
.viewer-nav .btn svg { width: 15px; height: 15px; }

.global-drawer { position: absolute; z-index: 9; left: 10px; top: calc(var(--topbar) + 10px); bottom: 10px; width: min(360px, calc(100vw - 20px));
  display: flex; flex-direction: column; overflow: hidden; animation: drawer-in 0.25s ease-out; }
.global-drawer .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 16px; }
.global-drawer .panel-head h2 { margin: 0; font-size: 16px; }
.drawer-list { overflow: auto; padding: 0 10px 12px; display: grid; gap: 8px; }
.drawer-card { display: flex; gap: 11px; align-items: center; padding: 7px; border-radius: 12px; border: 1px solid transparent; background: none;
  color: var(--text); text-align: left; cursor: pointer; font: inherit; width: 100%; }
.drawer-card:hover { background: var(--bg-hover); border-color: var(--line); }
.drawer-cover { width: 68px; height: 52px; border-radius: 9px; overflow: hidden; background: var(--bg-elev-2); flex: none; display: grid; place-items: center; color: var(--text-faint); }
.drawer-cover img { width: 100%; height: 100%; object-fit: cover; }
.drawer-title { font: 600 15px/1.25 var(--font-display); }
.drawer-info .small { font-size: 12.5px; }
@keyframes drawer-in { from { opacity: 0; transform: translateX(-12px); } }

@media (max-width: 760px) {
  .global-head { padding: 10px 12px; }
  .global-head h1 { font-size: 20px; }
  .global-hint { display: none; }
  .global-intro { left: 10px; right: 10px; bottom: 56px; width: auto; padding: 14px 16px; }
  .global-intro h2 { font-size: 21px; margin-bottom: 4px; }
  .global-intro p { font-size: 14px; margin-bottom: 8px; }
  .intro-points, .global-intro .hint, .intro-kicker { display: none; }
  .global-head-actions .btn span { display: none; }
  .global-legend { bottom: 66px; font-size: 12px; }
  .global-drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 60vh; border-radius: 18px 18px 0 0; }
  .global-page .maplibregl-ctrl-top-right { top: calc(var(--topbar) + 140px); }
  .global-page.panel-open .maplibregl-ctrl-top-right { right: 0; }
  .global-panel { top: auto; bottom: 0; max-height: 64vh; }
}

/* ---------------------------------------------------------------- shared by review, admin, groups, settings */
.explore-page .page-head h1 { margin-bottom: 4px; }
.score-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; }
.score-card .score { font: 700 26px var(--font-display); color: var(--accent); min-width: 44px; text-align: center; }
.score-card .trusted { color: var(--ok); font-weight: 650; display: inline-flex; gap: 5px; align-items: center; }
.score-card .trusted svg { width: 16px; height: 16px; }

.review-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.review-card .review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.review-card .review-head h3 { font: 600 19px/1.25 var(--font-display); margin: 0 0 3px; }
.review-card .meta { color: var(--text-dim); font-size: 13.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.review-gallery .thumb { border: 0; padding: 0; }
.review-gallery .more { display: grid; place-items: center; font-weight: 700; color: var(--text-dim); background: var(--bg-elev-2); border-radius: 8px; aspect-ratio: 1; }
.approvals { display: inline-flex; gap: 4px; align-items: center; }
.approvals .pip { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.approvals .pip.on { background: var(--ok); }
.votes { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13.5px; }
.votes li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.votes .verdict { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
.votes .verdict.approve { color: var(--ok); }
.votes .verdict.todelete { color: var(--danger); }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review-actions input { max-width: 340px; }

.report-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: start; }
.report-card .report-photo { border-radius: 10px; overflow: hidden; background: var(--bg-elev-2); aspect-ratio: 4 / 3; cursor: zoom-in; border: 0; padding: 0; }
.report-card .report-photo img { width: 100%; height: 100%; object-fit: cover; }
.report-count { font: 700 14px var(--font); color: var(--danger); }
.reasons { margin: 6px 0 10px; padding-left: 18px; color: var(--text-dim); font-size: 14px; }

.admin-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-row-album { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.admin-row-album .mini-cover { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--bg-elev-2); display: grid; place-items: center; color: var(--text-faint); }
.admin-row-album .mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.admin-row-album .title { font-weight: 650; }
.admin-row-album .meta { color: var(--text-dim); font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.list-rows { display: grid; gap: 8px; }
.list-rows > .card { padding: 12px 14px; }
.list-rows > .card + .card { margin-top: 0; }
.stack > .card + .card { margin-top: 12px; }
.table-wrap { overflow-x: auto; }
table.list td .btn-row { flex-wrap: nowrap; }
.event-details { color: var(--text-faint); font-size: 12.5px; font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.search-row { display: flex; gap: 8px; margin-bottom: 14px; max-width: 420px; }

/* groups */
.group-card { display: grid; gap: 12px; }
.group-card .group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.group-card .group-head h2 { margin: 0; display: flex; gap: 8px; align-items: center; }
.group-card .group-head h2 svg { width: 20px; height: 20px; color: var(--accent); }
.members { display: flex; flex-wrap: wrap; gap: 8px; }
.member { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px; border-radius: 999px; background: var(--bg-elev-2); border: 1px solid var(--line); font-size: 14px; }
.member .avatar { width: 26px; height: 26px; font-size: 12px; border-width: 0; }
.member.invited { border-style: dashed; color: var(--text-dim); }
.member .btn.icon.small { width: 24px; min-height: 24px; height: 24px; }
.member .btn.icon.small svg { width: 13px; height: 13px; }
.invite-row { display: flex; gap: 8px; max-width: 460px; }
.invitation { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.explainer { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 8px; }
.explainer .item { display: flex; gap: 10px; color: var(--text-dim); font-size: 14px; }
.explainer .item svg { width: 20px; height: 20px; flex: none; color: var(--glacier); margin-top: 1px; }

/* settings */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 26px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar) + 20px); display: grid; gap: 2px; }
.settings-nav a { color: var(--text-dim); padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; display: flex; gap: 9px; align-items: center; }
.settings-nav a svg { width: 17px; height: 17px; }
.settings-nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.settings-section { scroll-margin-top: calc(var(--topbar) + 20px); }
.settings-section > h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; }
.settings-section > h2 svg { width: 20px; height: 20px; color: var(--accent); }
.settings-section > .lead { color: var(--text-dim); margin-bottom: 14px; }
.settings-section + .settings-section { margin-top: 18px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.radio-list { display: grid; gap: 8px; }
.radio-option { display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--bg); }
.radio-option:hover { border-color: var(--line-strong); }
.radio-option.on { border-color: var(--accent); background: var(--accent-soft); }
.radio-option input { margin-top: 4px; accent-color: var(--accent); }
.radio-option .label { font-weight: 650; }
.radio-option .hint { margin: 2px 0 0; }
.radio-option .chips { margin-top: 9px; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; background: var(--bg); }
.segmented button { border: 0; background: none; color: var(--text-dim); padding: 5px 13px; border-radius: 999px; font: 600 13px var(--font); cursor: pointer; }
.segmented button.on { background: var(--bg-elev-2); color: var(--text); box-shadow: var(--shadow-sm); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg); display: grid; gap: 8px; align-content: start; position: relative; }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan .plan-name { font: 600 19px var(--font-display); }
.plan .price { font: 700 24px var(--font); }
.plan .price small { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: 14px; color: var(--text-dim); }
.plan ul li { display: flex; gap: 7px; align-items: flex-start; }
.plan ul svg { width: 15px; height: 15px; flex: none; color: var(--ok); margin-top: 3px; }
.plan .current-tag { position: absolute; top: 12px; right: 12px; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.home-placeholder { color: var(--text-dim); }

@media (max-width: 860px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .settings-nav a { white-space: nowrap; }
  .report-card { grid-template-columns: 1fr; }
  .admin-row-album { grid-template-columns: 52px minmax(0, 1fr); }
  .admin-row-album .btn-row { grid-column: 1 / -1; }
}
