/* ═══════════════════════════════════════════════
   Mappythemap v4.0.0 by LO Media Agency
   Theme via CSS variables set by JS
   ═══════════════════════════════════════════════ */

.mappy-wrap {
    --m-primary: #7C5037;
    --m-primary-dk: #5A3825;
    --m-bg: #FBF1E4;
    --m-bg-dk: #EDE0CF;
    --m-glass: rgba(124,80,55,0.12);
    --m-pin-stroke: #FBF1E4;
    --m-shadow: 0 4px 24px rgba(0,0,0,0.12);
    --m-font: 'Outfit', sans-serif;

    display: flex;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    font-family: var(--m-font);
    color: var(--m-primary-dk);
    line-height: 1.5;
    position: relative;
}
.mappy-wrap *, .mappy-wrap *::before, .mappy-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Panel */
.mappy-panel {
    width: 420px; min-width: 320px; height: 100%;
    background: var(--m-bg);
    display: flex; flex-direction: column;
    border-right: 1.5px solid var(--m-bg-dk);
    z-index: 10; flex-shrink: 0;
}
.mappy-panel-header { padding: 24px 24px 0; flex-shrink: 0; }
.mappy-brand { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--m-primary); opacity: 0.6; margin-bottom: 10px; display: block; }
.mappy-title { font-family: 'DM Serif Display', serif !important; font-size: 24px !important; color: var(--m-primary) !important; line-height: 1.15 !important; margin-bottom: 2px !important; text-transform: none !important; letter-spacing: 0 !important; }
.mappy-subtitle { font-size: 13px !important; color: var(--m-primary) !important; opacity: 0.6; margin-bottom: 14px !important; font-weight: 400 !important; }

/* Tabs */
.mappy-tab-bar { display: flex; gap: 6px; padding: 0 24px 14px; flex-shrink: 0; flex-wrap: wrap; }
.mappy-tab { padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--m-primary); background: transparent; color: var(--m-primary); font-family: var(--m-font); font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap; line-height: 1.2; }
.mappy-tab:hover { background: var(--m-glass); }
.mappy-tab.mappy-tab--active { background: var(--m-primary); color: var(--m-bg); }

/* List */
.mappy-list { flex: 1; overflow-y: auto; padding: 0 12px 20px; }
.mappy-list::-webkit-scrollbar { width: 4px; }
.mappy-list::-webkit-scrollbar-thumb { background: var(--m-primary); opacity: 0.3; border-radius: 10px; }

/* Card */
.mappy-card { display: flex; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer; transition: all 0.25s cubic-bezier(0.16,1,0.3,1); border: 1.5px solid transparent; }
.mappy-card:hover { background: var(--m-glass); }
.mappy-card.mappy-card--sel { background: var(--m-primary); border-color: var(--m-primary); }

/* Selected card — explicit children turn to bg color. NO wildcard * */
.mappy-card.mappy-card--sel .mappy-card-name,
.mappy-card.mappy-card--sel .mappy-card-addr,
.mappy-card.mappy-card--sel .mappy-card-rating,
.mappy-card.mappy-card--sel .mappy-card-rating span,
.mappy-card.mappy-card--sel .mappy-card-dist,
.mappy-card.mappy-card--sel .mappy-card-blurb,
.mappy-card.mappy-card--sel .mappy-card-exp,
.mappy-card.mappy-card--sel .mappy-card-exp .mappy-detail,
.mappy-card.mappy-card--sel .mappy-card-exp .mappy-detail span { color: var(--m-bg); }
.mappy-card.mappy-card--sel .mappy-card-rating svg { fill: var(--m-bg); }
.mappy-card.mappy-card--sel .mappy-card-exp .mappy-detail svg { stroke: var(--m-bg); }
.mappy-card.mappy-card--sel .mappy-card-dist { background: rgba(255,255,255,0.15); display: inline-flex; }
.mappy-card.mappy-card--sel .mappy-card-icon { background: rgba(255,255,255,0.2); }
.mappy-card.mappy-card--sel .mappy-card-exp { display: block; }

.mappy-card-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--m-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mappy-card-body { flex: 1; min-width: 0; }
.mappy-card-name { font-family: 'DM Serif Display', serif; font-size: 15px; color: var(--m-primary-dk); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.mappy-card-addr { font-size: 11.5px; color: var(--m-primary); opacity: 0.7; margin-bottom: 4px; }
.mappy-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mappy-card-rating { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--m-primary); }
.mappy-card-rating svg { width: 12px; height: 12px; fill: var(--m-primary); }
.mappy-card-rating span { font-weight: 400; color: var(--m-primary); opacity: 0.7; }
.mappy-card-dist { font-size: 10px; font-weight: 600; color: var(--m-primary); background: var(--m-glass); border-radius: 8px; padding: 2px 7px; display: none; }
.mappy-card-blurb { font-size: 12px; color: var(--m-primary); opacity: 0.7; line-height: 1.4; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mappy-card-exp { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.15); }
.mappy-card-exp .mappy-detail { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; font-size: 12px; line-height: 1.4; }
.mappy-card-exp .mappy-detail svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; opacity: 0.6; }

/* ══════════════════════════════════════════════
   GET DIRECTIONS BUTTON — fully isolated class
   Never inherits color from parent card state.
   ══════════════════════════════════════════════ */
.mappy-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 18px;
    background: var(--m-bg);
    border-radius: 22px;
    font-family: var(--m-font);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    line-height: 1;
}
/* Text color — set directly, no !important, no inheritance */
.mappy-directions-btn { color: #000000; }
.mappy-directions-btn:link,
.mappy-directions-btn:visited,
.mappy-directions-btn:hover,
.mappy-directions-btn:active,
.mappy-directions-btn:focus { color: #000000; text-decoration: none; }
.mappy-directions-btn:hover { background: #ffffff; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.mappy-directions-btn svg { width: 13px; height: 13px; }
.mappy-directions-btn svg * { stroke: #000000; fill: none; }

/* Map */
.mappy-map-side { flex: 1; position: relative; height: 100%; min-width: 0; }
.mappy-gmap { width: 100%; height: 100%; }

/* Building Pin */
.mappy-bld-wrap { display: flex; flex-direction: column; align-items: center; position: relative; cursor: default; }
.mappy-bld-pin { width: 48px; height: 48px; border-radius: 50% 50% 50% 0; background: var(--m-primary-dk); border: 3px solid var(--m-bg); box-shadow: 0 4px 18px rgba(0,0,0,0.25); display: flex; align-items: center; justify-content: center; transform: rotate(-45deg); position: relative; z-index: 2; }
.mappy-bld-pin svg { transform: rotate(45deg); }
.mappy-bld-pulse { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 48px; height: 48px; border-radius: 50%; background: var(--m-primary); opacity: 0.2; z-index: 1; animation: mappy-pulse 2.5s cubic-bezier(0.4,0,0.6,1) infinite; }
@keyframes mappy-pulse { 0%{transform:translateX(-50%) scale(1);opacity:0.4;} 70%{transform:translateX(-50%) scale(2.2);opacity:0;} 100%{transform:translateX(-50%) scale(2.2);opacity:0;} }
.mappy-bld-label { margin-top: 4px; background: var(--m-primary-dk); color: var(--m-bg); font-family: var(--m-font); font-size: 11px; font-weight: 600; letter-spacing: 0.03em; padding: 3px 10px; border-radius: 10px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.2); z-index: 2; }

/* POI */
.mappy-poi { width: 34px; height: 34px; border-radius: 50%; background: var(--m-primary); border: 2.5px solid var(--m-bg); box-shadow: 0 2px 10px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s cubic-bezier(0.16,1,0.3,1); }
.mappy-poi:hover { transform: scale(1.15); }
.mappy-poi.mappy-poi--hl { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(0,0,0,0.1), 0 4px 20px rgba(0,0,0,0.25); z-index: 9999 !important; }
.mappy-poi.mappy-poi--dim { opacity: 0.25; transform: scale(0.85); }

/* Distance Badge */
.mappy-dist-badge { background: var(--m-primary-dk); color: var(--m-bg); font-family: var(--m-font); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 14px; white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,0.2); text-align: center; pointer-events: none; }

/* Mobile */
@media (max-width: 768px) {
    .mappy-wrap { flex-direction: column !important; height: 100vh !important; }
    .mappy-panel { width: 100% !important; min-width: unset !important; height: 50vh !important; border-right: none !important; border-bottom: 1.5px solid var(--m-bg-dk); overflow: hidden !important; }
    .mappy-list { padding: 0 8px 16px !important; overflow-y: auto !important; }
    .mappy-map-side { height: 50vh !important; }
    .mappy-panel-header { padding: 14px 16px 0 !important; }
    .mappy-title { font-size: 18px !important; }
    .mappy-subtitle { font-size: 11px !important; margin-bottom: 10px !important; }
    .mappy-brand { font-size: 9px !important; margin-bottom: 8px !important; }
    .mappy-tab-bar { padding: 0 16px 10px !important; gap: 5px !important; }
    .mappy-tab { padding: 4px 10px !important; font-size: 11px !important; }
    .mappy-card { padding: 10px !important; gap: 10px !important; border-radius: 10px !important; }
    .mappy-card-icon { width: 34px !important; height: 34px !important; border-radius: 8px !important; }
    .mappy-card-name { font-size: 13.5px !important; }
    .mappy-card-blurb { font-size: 11px !important; -webkit-line-clamp: 1 !important; }
    .mappy-directions-btn { padding: 6px 14px !important; font-size: 11px !important; }
}
