/* turafan.sk – detail trasy, editor, galéria, lightbox, mapové markery */

/* ---------- markery (map.js) ---------- */
.tf-marker { display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.35); border: 2px solid #fff; }
.tf-marker-start { background: var(--tf-accent); }
.tf-marker-end { background: #b23a3a; }
.tf-marker-parking { background: #2b7bb9; font-size: 18px; }
.tf-marker-hover { background: #fff; border: 3px solid var(--tf-accent); }
.tf-marker-draw { background: #fff; border: 2px solid var(--tf-accent); width: 12px; height: 12px; }
.tf-marker-trail { background: var(--tf-accent); width: 26px; height: 26px; font-size: 13px; cursor: pointer; }
.tf-marker-trail.is-done { background: #1f2a24; }
.tf-marker-trail.is-active { background: #d9742b; transform: scale(1.2); }

/* ---------- detail trasy ---------- */
.tf-trail-hero { position: relative; border-radius: var(--tf-radius); overflow: hidden; background: var(--tf-accent-soft); aspect-ratio: 16 / 9; max-height: 420px; }
.tf-trail-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-trail-hero .tf-hero-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--tf-accent); font-size: 3rem; opacity: .6; }
.tf-trail-hero .tf-hero-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tf-trail-hero .badge { font-size: .75rem; padding: 5px 9px; border-radius: 8px; font-weight: 600; }
.tf-trail-title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 14px 0 4px; }
.tf-trail-meta { color: var(--tf-muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.tf-trail-meta a { color: inherit; }
.tf-trail-params { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.tf-param { background: var(--tf-card-bg); border: 1px solid var(--tf-border); border-radius: 12px; padding: 10px 8px; text-align: center; }
.tf-param i { color: var(--tf-accent); font-size: 1.1rem; display: block; margin-bottom: 2px; }
.tf-param strong { display: block; font-size: 1.05rem; line-height: 1.2; }
.tf-param small { color: var(--tf-muted); font-size: .72rem; }
.tf-trail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.tf-trail-actions .btn { border-radius: 10px; }
.tf-section { margin-top: 16px; }
.tf-section-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.tf-section-title i { color: var(--tf-accent); }
.tf-section-title .badge { font-size: .7rem; }
.tf-trail-map { height: 300px; border-radius: var(--tf-radius); overflow: hidden; border: 1px solid var(--tf-border); background: #e9eeeb; }
.tf-elev { width: 100%; height: 170px; display: block; border-radius: 10px; background: var(--tf-card-bg); touch-action: pan-y; }
.tf-elev-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--tf-muted); margin-top: 6px; }
.tf-elev-stats strong { color: var(--tf-text); }
.tf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; padding: 4px 10px; border-radius: 12px; background: var(--tf-accent-soft); color: var(--tf-accent-dark); text-decoration: none; }
.tf-chip:hover { background: var(--tf-accent); color: #fff; }
.tf-attr-group { margin-bottom: 10px; }
.tf-attr-group h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tf-muted); margin: 0 0 6px; }
.tf-attr { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 6px 10px; border-radius: 10px; background: var(--tf-card-bg); border: 1px solid var(--tf-border); margin: 0 6px 6px 0; }
.tf-attr i { color: var(--tf-accent); }
.tf-attr .tf-attr-val { color: var(--tf-muted); }
.tf-description { line-height: 1.6; }
.tf-description img { max-width: 100%; height: auto; border-radius: 10px; }
.tf-description blockquote { border-left: 3px solid var(--tf-accent); padding-left: 12px; color: var(--tf-muted); }
.tf-description h2 { font-size: 1.25rem; } .tf-description h3 { font-size: 1.1rem; } .tf-description h4 { font-size: 1rem; }

.tf-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tf-gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--tf-accent-soft); position: relative; }
.tf-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.tf-gallery a:hover img { transform: scale(1.04); }
.tf-gallery .tf-gallery-user { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; font-size: .68rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 576px) { .tf-gallery { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px) { .tf-gallery { grid-template-columns: repeat(6, 1fr); } }

.tf-parking-map { height: 180px; border-radius: 12px; overflow: hidden; border: 1px solid var(--tf-border); }

.tf-stars { color: #f0b429; white-space: nowrap; letter-spacing: 1px; }
.tf-stars i { font-size: 1em; }
.tf-rating-summary { display: flex; align-items: center; gap: 10px; }
.tf-rating-summary .tf-rating-big { font-size: 2rem; font-weight: 700; line-height: 1; }
.tf-rating-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--tf-border); }
.tf-rating-item:first-child { border-top: 0; }
.tf-rating-item .tf-rating-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .85rem; }
.tf-rating-item .tf-rating-comment { margin: 4px 0 0; font-size: .92rem; white-space: pre-line; }
.tf-star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; font-size: 1.7rem; }
.tf-star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.tf-star-input label { color: #d7dcd9; cursor: pointer; line-height: 1; }
.tf-star-input input:checked ~ label, .tf-star-input label:hover, .tf-star-input label:hover ~ label { color: #f0b429; }

/* ---------- lightbox ---------- */
.tf-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(10,14,12,.94); display: none; align-items: center; justify-content: center; }
.tf-lightbox.open { display: flex; }
body.tf-lightbox-open { overflow: hidden; }
.tf-lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tf-lb-img { max-width: 100vw; max-height: calc(100vh - 70px); object-fit: contain; }
.tf-lb-caption { color: #e6ebe8; font-size: .9rem; padding: 10px 16px; text-align: center; max-width: 900px; }
.tf-lb-caption:empty { display: none; }
.tf-lb-close, .tf-lb-prev, .tf-lb-next { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }
.tf-lb-close { top: 12px; right: 12px; }
.tf-lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.tf-lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.tf-lb-counter { position: absolute; top: 24px; left: 16px; color: #cfd6d2; font-size: .85rem; }

/* ---------- editor ---------- */
.tf-editor-tabs { position: sticky; top: var(--tf-topbar-h); z-index: 1020; background: var(--tf-bg); margin: -16px -16px 12px; padding: 8px 16px 0; }
.tf-editor-tabs .nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tf-editor-tabs .nav::-webkit-scrollbar { display: none; }
.tf-editor-tabs .nav-link { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tf-editor-tabs .nav-link .tf-tab-ok { color: var(--tf-accent); font-size: .8rem; }
.tf-editor-tabs .nav-link .tf-tab-ok.d-none { display: none; }
@media (min-width: 992px) { .tf-editor-tabs { top: var(--tf-topbar-h); margin: -24px -16px 16px; } }
.tf-editor-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tf-dropzone {
  border: 2px dashed var(--tf-border); border-radius: var(--tf-radius); padding: 24px 16px; text-align: center; color: var(--tf-muted);
  background: var(--tf-card-bg); cursor: pointer; transition: border-color .15s, background .15s;
}
.tf-dropzone:hover, .tf-dropzone.is-over { border-color: var(--tf-accent); background: var(--tf-accent-soft); color: var(--tf-accent-dark); }
.tf-dropzone i { font-size: 2rem; display: block; margin-bottom: 4px; color: var(--tf-accent); }
.tf-editor-map { height: 320px; border-radius: var(--tf-radius); overflow: hidden; border: 1px solid var(--tf-border); background: #e9eeeb; position: relative; }
.tf-editor-map.is-drawing { cursor: crosshair; }
.tf-editor-map.is-drawing .leaflet-container, .tf-editor-map.is-parking .leaflet-container { cursor: crosshair; }
.tf-editor-map .tf-map-hint { position: absolute; z-index: 800; left: 50%; top: 10px; transform: translateX(-50%); background: #1f2a24; color: #fff; padding: 4px 12px; border-radius: 16px; font-size: .78rem; white-space: nowrap; pointer-events: none; }
.tf-geo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 576px) { .tf-geo-stats { grid-template-columns: repeat(6, 1fr); } }

.tf-photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 576px) { .tf-photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .tf-photo-grid { grid-template-columns: repeat(4, 1fr); } }
.tf-photo-card { position: relative; border-radius: 12px; overflow: hidden; background: var(--tf-card-bg); border: 1px solid var(--tf-border); cursor: grab; }
.tf-photo-card.is-dragging { opacity: .4; }
.tf-photo-card.is-over { outline: 2px solid var(--tf-accent); }
.tf-photo-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.tf-photo-card .tf-photo-cover { position: absolute; top: 6px; left: 6px; }
.tf-photo-card .tf-photo-gps { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; border-radius: 8px; padding: 2px 6px; font-size: .7rem; }
.tf-photo-card .tf-photo-tools { display: flex; gap: 4px; padding: 6px; border-top: 1px solid var(--tf-border); }
.tf-photo-card .tf-photo-tools .btn { flex: 1 1 auto; padding: 3px 4px; font-size: .78rem; }
.tf-photo-card .tf-photo-caption { width: 100%; border: 0; border-top: 1px solid var(--tf-border); padding: 6px 8px; font-size: .8rem; background: transparent; }
.tf-photo-card .tf-photo-caption:focus { outline: none; background: var(--tf-accent-soft); }
.tf-upload-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; padding: 4px 0; }
.tf-upload-item .progress { flex: 1 1 auto; height: 8px; }
.tf-upload-item.is-error { color: #b23a3a; }

.tf-tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; border: 1px solid var(--tf-border); border-radius: 10px; background: var(--tf-card-bg); min-height: 44px; position: relative; }
.tf-tag-input:focus-within { border-color: var(--tf-accent); box-shadow: 0 0 0 .25rem rgba(47,143,91,.2); }
.tf-tag-input .tf-chip button { border: 0; background: none; padding: 0; color: inherit; line-height: 1; font-size: .9rem; }
.tf-tag-input input { flex: 1 1 120px; border: 0; outline: none; min-width: 80px; background: transparent; font-size: .95rem; }
.tf-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 1050; background: var(--tf-card-bg); border: 1px solid var(--tf-border); border-radius: 10px; box-shadow: var(--tf-shadow); max-height: 220px; overflow-y: auto; margin-top: 4px; display: none; }
.tf-suggest.open { display: block; }
.tf-suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; font-size: .9rem; }
.tf-suggest button:hover, .tf-suggest button.is-active { background: var(--tf-accent-soft); }
.tf-region-wrap { position: relative; }

.tf-checklist { list-style: none; padding: 0; margin: 0 0 12px; }
.tf-checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--tf-border); font-size: .95rem; }
.tf-checklist li:last-child { border-bottom: 0; }
.tf-checklist i { font-size: 1.2rem; }
.tf-checklist .ok i { color: var(--tf-accent); }
.tf-checklist .missing i { color: #d9742b; }
.tf-checklist .optional i { color: #aab3ae; }
.tf-checklist small { color: var(--tf-muted); margin-left: auto; }

#tfQuill { min-height: 260px; background: var(--tf-card-bg); font-size: 1rem; }
.ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; border-color: var(--tf-border); background: var(--tf-card-bg); }
.ql-container.ql-snow { border-radius: 0 0 10px 10px; border-color: var(--tf-border); }
.ql-editor { min-height: 260px; }
.tf-quill-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tf-quill-pick img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.tf-quill-pick img:hover { border-color: var(--tf-accent); }

/* Moje trasy */
.tf-mine-item { display: flex; gap: 12px; align-items: center; }
.tf-mine-item .tf-mine-thumb { flex: 0 0 96px; width: 96px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--tf-accent-soft); display: flex; align-items: center; justify-content: center; color: var(--tf-accent); font-size: 1.5rem; }
.tf-mine-item .tf-mine-body { flex: 1 1 auto; min-width: 0; }
.tf-mine-item .tf-mine-title { font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* desktop: parametre v jednom riadku */
@media (min-width: 768px) { .tf-trail-params { grid-template-columns: repeat(6, 1fr); } }
