﻿/* ── Layout ── */

.tourinfo-layout {
    display: flex;
    height: calc(100vh - 64px);
    background: #f8f9fa;
    overflow: hidden;
}


/* ── Map area ── */

.tourinfo-map {
    flex: 1;
    min-width: 0;
    position: relative;
}

#mapWrap,
#map {
    width: 100%;
    height: 100%;
}

.map-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}


/* ── Right panel ── */

.tourinfo-panel {
    width: 280px;
    min-width: 280px;
    background: #fff;
    border-left: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}


/* ── Thumbnail hero ── */

.ti-hero {
    position: relative;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}

    .ti-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.ti-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, transparent 40%, rgba(0, 0, 0, 0.5) 100% );
}

.ti-hero-title {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 40px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.ti-play-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: #1a9e5c;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background .15s;
    flex-shrink: 0;
}

    .ti-play-btn:hover {
        background: #157a47;
    }

    .ti-play-btn i {
        font-size: 18px;
    }


/* ── Panel body ── */

.ti-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}


/* ── Action buttons row ── */

.ti-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ti-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    text-decoration: none;
    white-space: nowrap;
}

    .ti-action-btn:hover {
        background: #f8f9fa;
        border-color: #adb5bd;
    }

    .ti-action-btn i {
        font-size: 15px;
    }

    .ti-action-btn.danger {
        color: #dc3545;
        border-color: #f5c6cb;
    }

        .ti-action-btn.danger:hover {
            background: #fff5f5;
            border-color: #dc3545;
        }

    .ti-action-btn.active {
        background: #fff8e1;
        border-color: #ffc107;
        color: #856404;
    }


/* ── Section label ── */

.ti-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #adb5bd;
    margin-bottom: 6px;
}


/* ── Stats row ── */

.ti-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ti-stat {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
}

.ti-stat-val {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

.ti-stat-lbl {
    font-size: 10px;
    color: #6c757d;
    margin-top: 1px;
}


/* ── Tags ── */

.ti-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ti-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 9px;
    background: #f1f3f5;
    color: #495057;
    border-radius: 20px;
    border: none;
    cursor: default;
}


/* ── Tour type badges ── */

.ti-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ti-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    border: 1.5px solid transparent;
}

.ti-mode-tour {
    background: #bbdefb;
    color: #1565c0;
    border-color: #90caf9;
}

.ti-mode-run {
    background: #c8e6c9;
    color: #1b5e20;
    border-color: #a5d6a7;
}

.ti-mode-cycle {
    background: #fff9c4;
    color: #f57f17;
    border-color: #fff176;
}

.ti-mode-breathe {
    background: #e1bee7;
    color: #4a148c;
    border-color: #ce93d8;
}


/* ── Info settings ── */

.ti-settings {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ti-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
}

    .ti-check-row input {
        accent-color: #1a9e5c;
        width: 14px;
        height: 14px;
        cursor: pointer;
    }


/* ── Map overlay controls ── */

#tourSetting {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.btnOnMap {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #212529 !important;
    backdrop-filter: blur(6px);
    transition: background .15s !important;
    padding: 4px 10px !important;
    height: 31px !important;
    line-height: 1 !important;
}

    .btnOnMap:hover {
        background: #fff !important;
    }

.btnOnMap2 {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: #dee2e6 !important;
    color: #212529 !important;
    font-size: 12px !important;
    padding: 4px 10px !important;
    height: 31px !important;
    line-height: 1 !important;
}

.btn-check:checked + .btnOnMap2 {
    background: #e8f5e9 !important;
    border-color: #1a9e5c !important;
    color: #1a9e5c !important;
}


/* ── Tour description overlay ── */
/* Positioned by displaySettingButton() JavaScript */

.text-on-tour-desc {
    position: absolute;
    background: rgba(20, 30, 40, 0.88);
    color: #fff;
    border-radius: 12px;
    z-index: 20;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 10px 16px 14px;
    display: none;
}

.tour-drag-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto 10px;
}

.tourInfoClose {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
    padding: 0;
}

    .tourInfoClose:hover {
        background: rgba(255, 255, 255, 0.28);
    }

#tourName {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding-right: 28px;
    margin: 0 0 6px 0;
}

#tourDescription {
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}


/* ── Divider ── */

.ti-divider {
    border: none;
    border-top: 1px solid #f1f3f5;
    margin: 0;
}


/* ── Admin section ── */

.ti-admin {
    display: flex;
    gap: 6px;
}
