/* ¤¤¤ Weazel Reviews: seznam podniků, mapa, detail s hodnocením a recenzemi, profil a správci. Barvy a písma
   jsou ze zaklad.css, společné prvky (btn, tab, field, avatar, comment-as) z weazel.css. ¤¤¤ */

/* ¤¤¤ ============================================================ ¤¤¤
   ¤¤¤ ========================   SPOLEČNÉ   ====================== ¤¤¤
   ¤¤¤ ============================================================ ¤¤¤ */

.rv-head .rv-switch { display: flex; gap: 8px; margin-top: 16px; }
.rv-head .search-page-form { margin-top: 16px; }
.rv-h2 { font-size: 22px; font-weight: 900; font-stretch: 72%; font-style: italic; text-transform: uppercase; margin-bottom: 14px; }
.rv-kind { font-size: 12px; font-weight: 800; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; }
.rv-note { padding: 18px 20px; background: var(--card); color: var(--muted); }
.rv-inactive { color: var(--error); font-weight: 700; }
.rv-inline-form { display: inline-flex; margin: 0; }
.rv-address, .rv-phone { font-size: 14px; color: var(--muted); }

.rv-stars { position: relative; display: inline-block; font-size: 18px; line-height: 1; letter-spacing: 2px; color: var(--muted-3); white-space: nowrap; vertical-align: middle; }
.rv-stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--amber); white-space: nowrap; }
.rv-stars--sm { font-size: 14px; }
.rv-rating { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.rv-rating strong { font-size: 16px; color: var(--amber); }

.rv-open { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.rv-open .rv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); }
.rv-open.is-open { color: var(--online); }
.rv-open.is-open .rv-dot { background: var(--online); box-shadow: 0 0 8px var(--online); }
.rv-open.is-closed { color: var(--muted); }
.rv-open.is-closed .rv-dot { background: var(--offline); }

/* ¤¤¤ ============================================================ ¤¤¤
   ¤¤¤ =========================   SEZNAM   ======================== ¤¤¤
   ¤¤¤ ============================================================ ¤¤¤ */

.rv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.rv-card { display: flex; flex-direction: column; background: var(--card); min-width: 0; }
.rv-card-photo { display: block; aspect-ratio: 16 / 9; background: var(--card-2); overflow: hidden; }
.rv-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-card-blank { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font: 900 44px var(--sans); font-stretch: 66%; font-style: italic; color: var(--muted-3); }
.rv-card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex-grow: 1; }
.rv-card-title { font-size: 22px; font-weight: 900; font-stretch: 72%; line-height: 1.1; text-transform: uppercase; font-style: italic; }
.rv-card-title a:hover { color: var(--amber); }
.rv-card-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-height: 18px; }
.rv-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.rv-card-actions .btn { gap: 6px; }

/* ¤¤¤ ============================================================ ¤¤¤
   ¤¤¤ ==========================   MAPA   ========================= ¤¤¤
   ¤¤¤ ============================================================ ¤¤¤ */

.rv-map-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rv-map-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.rv-map-buttons { display: flex; gap: 8px; }
.rv-map { position: relative; z-index: 0; isolation: isolate; }
.rv-map-canvas { height: 72vh; min-height: 420px; background: var(--bg-deep); border: 1px solid var(--line); }
.rv-map-canvas:focus { outline: none; }
.rv-map-notice { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 500; max-width: 90%; padding: 10px 16px; background: var(--deep-glass); color: var(--text); font-size: 14px; font-weight: 700; }

.wz-pin { box-sizing: border-box; border-radius: 50%; background: var(--muted-2); border: 2px solid var(--white); box-shadow: 0 0 0 2px rgba(5, 8, 22, .5); cursor: pointer; }
.wz-pin--open { background: var(--online); box-shadow: 0 0 0 2px rgba(5, 8, 22, .5), 0 0 10px var(--online); }
.wz-pin--closed { background: var(--offline); }
.wz-pin--me { background: var(--blue); border-color: var(--white); box-shadow: 0 0 0 4px rgba(124, 156, 255, .35); cursor: default; }
.rv-map-canvas.is-far .wz-pin-label { display: none; }
.wz-pin-label { position: absolute; left: 18px; top: -2px; white-space: nowrap; font: 700 12px/1.3 var(--sans); color: var(--white); text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 2px #000; pointer-events: none; }

.leaflet-popup-content-wrapper { background: var(--card); color: var(--text); border-radius: 0; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.leaflet-popup-tip { background: var(--card); }
.leaflet-popup-content { margin: 14px 16px; font: 14px var(--sans); line-height: 1.4; min-width: 200px; }
.leaflet-popup-close-button { color: var(--muted) !important; }
/* ¤¤¤ Leaflet barví odkazy v mapě svou modrou (.leaflet-container a), tlačítka v bublině mají mít svoje barvy. ¤¤¤ */
.leaflet-container a.btn { color: var(--text); }
.leaflet-container a.btn-red { color: var(--white); }
.rv-popup-title { font-size: 17px; font-weight: 900; font-stretch: 72%; text-transform: uppercase; font-style: italic; margin-bottom: 4px; }
.rv-popup-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rv-popup-rating strong { color: var(--amber); }
.rv-popup-actions { display: flex; gap: 8px; margin-top: 10px; }
.rv-popup-actions .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
.rv-popup-actions form { margin: 0; }

/* ¤¤¤ ============================================================ ¤¤¤
   ¤¤¤ =========================   DETAIL   ======================== ¤¤¤
   ¤¤¤ ============================================================ ¤¤¤ */

.rv-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.rv-profile { background: var(--card); display: flex; flex-direction: column; }
.rv-profile-photo { aspect-ratio: 16 / 9; background: var(--card-2); overflow: hidden; }
.rv-profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-profile-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 22px 22px; }
.rv-profile-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.rv-description { font-size: 16px; line-height: 1.55; color: var(--text-3); white-space: pre-line; overflow-wrap: anywhere; }

.rv-score { background: var(--card); padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.rv-score-top { display: flex; align-items: center; gap: 16px; }
.rv-score-top > div { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rv-score-number { font: 900 54px/1 var(--sans); font-stretch: 66%; font-style: italic; color: var(--amber); }
.rv-score-number.is-empty { color: var(--muted-3); }
.rv-bars { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
.rv-bars li { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 10px; font-size: 14px; }
.rv-bars li b { text-align: right; font-variant-numeric: tabular-nums; }
.rv-bar { display: block; height: 8px; background: var(--bg-deep); overflow: hidden; }
.rv-bar span { display: block; height: 100%; background: var(--amber); }

.rv-rate-box { margin-top: 28px; }
.rv-form { display: flex; flex-direction: column; gap: 16px; background: var(--card); padding: 20px 22px 22px; }
.rv-form .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.rv-rate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.rv-rate { border: 0; padding: 0; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rv-rate legend { float: left; font-weight: 700; font-size: 15px; padding: 0; }
.rv-stars-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rv-stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-stars-input label { font-size: 30px; line-height: 1; color: var(--muted-3); cursor: pointer; transition: color .1s; }
.rv-stars-input label:hover, .rv-stars-input label:hover ~ label, .rv-stars-input input:checked ~ label { color: var(--amber); }
.rv-stars-input input:focus-visible + label { outline: 2px solid var(--amber); outline-offset: 2px; }

.rv-reviews { margin-top: 36px; }
.rv-review { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.rv-review .avatar { width: 40px; height: 40px; font-size: 15px; background: var(--line); border: 0; }
.rv-review-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex-grow: 1; }
.rv-review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.rv-review-head .time { color: var(--muted-2); }
.rv-review-number { color: var(--amber); }
.rv-review-scores { display: flex; gap: 14px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--muted); }
.rv-review-scores b { color: var(--text-2); margin-left: 4px; }
.rv-review-text { font-size: 16px; line-height: 1.5; color: var(--text-3); white-space: pre-line; overflow-wrap: anywhere; }
.rv-review-tools { display: flex; gap: 12px; align-items: center; }
.rv-review-tools form { display: flex; margin: 0; }
.rv-review-tools .link, .rv-reply .link { background: none; border: 0; padding: 0; color: var(--muted); font: 600 13px var(--sans); cursor: pointer; }
.rv-reply { margin-top: 4px; padding: 12px 16px; background: var(--card); border-left: 3px solid var(--amber); display: flex; flex-direction: column; gap: 6px; }
.rv-reply-head { font-size: 14px; }
.rv-reply-head .time { color: var(--muted-2); }
.rv-reply p { font-size: 15px; line-height: 1.5; color: var(--text-3); white-space: pre-line; }
.rv-reply form { margin: 0; }
.rv-reply-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rv-reply-form .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ¤¤¤ ============================================================ ¤¤¤
   ¤¤¤ =====================   PROFIL A SPRÁVCI   ================== ¤¤¤
   ¤¤¤ ============================================================ ¤¤¤ */

.rv-xy { gap: 12px; }
.rv-xy .input-suffix > .input { text-align: left; padding-left: 0; }
.rv-xy-label { padding: 0 10px 0 14px; color: var(--muted); font-weight: 800; }
.rv-edit-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.rv-edit-photo img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; }
.rv-team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.rv-team-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.rv-team-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rv-team-list li:first-child { border-top: 0; }
.rv-team-name { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; font-size: 15px; }
.rv-team-name .muted { font-size: 13px; }
.rv-team-list form { margin: 0; }
.rv-grade-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.rv-grade-form .field { width: 100%; }
.rv-open-note { font-size: 13px; margin: 6px 0 0; }
.rv-card-actions form { margin: 0; }

/* ¤¤¤ ============================================================ ¤¤¤
   ¤¤¤ ======================   MENŠÍ DISPLEJE   =================== ¤¤¤
   ¤¤¤ ============================================================ ¤¤¤ */

@media (max-width: 980px) {
  .rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .rv-detail { grid-template-columns: 1fr; }
  .rv-team { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .rv-grid { grid-template-columns: 1fr; }
  .rv-rate-grid { grid-template-columns: 1fr; }
  .rv-map-canvas { height: 62vh; min-height: 360px; }
  .rv-score-number { font-size: 44px; }
  .rv-bars li { grid-template-columns: 96px 1fr 32px; }
  .rv-card-title { font-size: 20px; }
  .rv-stars-input label { font-size: 28px; }
}
