/**
 * Planificador Tourdera — theme-specific styles.
 * Loads after planificador-override.css + planificador-wp-additions.css and
 * (a) neutralises GeneratePress chrome on the full-screen template, and
 * (b) styles the tram fitxa, selected-trams list, mode pills and base switcher.
 */

/* ---- GeneratePress reset for the full-screen planner ---- */
body.tourdera-planificador-body { margin: 0; padding: 0; background: #fff; }
body.tourdera-planificador-body #page { margin: 0; padding: 0; max-width: none; width: 100%; }
body.tourdera-planificador-body .site-header,
body.tourdera-planificador-body .main-navigation,
body.tourdera-planificador-body #nav-below,
body.tourdera-planificador-body .generate-back-to-top,
body.tourdera-planificador-body .site-footer { display: none !important; }
body.tourdera-planificador-body .site-content,
body.tourdera-planificador-body .site-main { margin: 0; padding: 0; }

/* ---- Base layer switcher ---- */
/* Els estils del switcher (miniatures en fila, com Enselva't) són a
   planificador-override.css. Aquí NO els sobreescrivim (abans forçaven columna
   + botons de text i xocaven amb les miniatures que renderitza el JS). */

/* ---- Right sidebar: tram fitxa ---- */
/* Etiquetes informatives (mode, dificultat, municipi): totes iguals i sense hover. */
.rightsidebar .tag-lst span { display: inline-block; height: 28px; padding: 4px 12px; border-radius: 6px; font-size: 12px; font-family: 'Poppins-Medium', system-ui, sans-serif; letter-spacing: -0.57px; text-transform: uppercase; background: rgba(0, 127, 111, 0.08); color: #007F6F; border: 1px solid rgba(0, 127, 111, 0.15); cursor: default; }
@media (max-width: 600px) { .rightsidebar .tag-lst span { height: auto; } }
.rightsidebar .img-div { position: relative; }
.rightsidebar .img-div img { width: 100%; height: 200px; object-fit: cover; display: block; }
.rightsidebar .img-div .img-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,0.65); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 14px; }
.right-content-inner { padding: 14px 16px 24px; }
.right-content-inner h3 { font-size: 19px; margin: 0 0 10px; color: #1a1a1a; }

.tram-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tram-stat { display: flex; flex-direction: column; background: #f5f8f7; border: 1px solid #e3ece9; border-radius: 6px; padding: 6px 10px; min-width: 70px; }
.tram-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: #7a8c87; }
.tram-stat-value { font-size: 15px; font-weight: 700; color: #007F6F; }

.btn-add-tram { width: 100%; border: none; background: #007F6F; color: #fff; font-weight: 700; padding: 11px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; margin: 4px 0 12px; transition: background .15s; }
.btn-add-tram:hover { background: #006558; }
.btn-add-tram.is-added { background: #c0392b; }
.btn-add-tram.is-added:hover { background: #a93226; }

.tram-desc { font-size: 13.5px; line-height: 1.6; color: #444; margin: 6px 0 12px; }
.tram-desc img, .tram-more img { max-width: 100%; height: auto; }
.tram-more { margin: 8px 0; border-top: 1px solid #eee; padding-top: 8px; font-size: 13px; line-height: 1.55; color: #555; }
.tram-more summary { cursor: pointer; font-weight: 600; color: #007F6F; outline: none; }
.tram-more[open] summary { margin-bottom: 6px; }

.tram-wikiloc { margin: 12px 0; }
.tram-wikiloc h4 { font-size: 14px; margin: 0 0 6px; color: #1a1a1a; }
.tram-wikiloc ul { list-style: none; margin: 0; padding: 0; }
.tram-wikiloc li { margin: 4px 0; }
.tram-wikiloc a { display: inline-flex; align-items: center; gap: 6px; color: #007F6F; font-size: 13px; text-decoration: none; }
.tram-wikiloc a:hover { text-decoration: underline; }
.tram-wikiloc a img { height: 18px; width: auto; }

.tram-links { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tram-pdf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #007F6F; color: #007F6F; font-weight: 600; padding: 9px 14px; border-radius: 6px; text-decoration: none; font-size: 13px; }
.tram-pdf-btn:hover { background: #f0f7f5; }
.tram-pdf-btn img { height: 16px; }

/* ---- Plan sidebar: selected trams ---- */
.selected-trams-list { list-style: none; margin: 0; padding: 0; }
.selected-tram-item { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e3e3e3; border-radius: 6px; padding: 6px 8px; margin: 6px 0; }
.selected-tram-item .seq { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: #007F6F; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.selected-tram-item .nm { flex: 1 1 auto; font-size: 13px; color: #333; cursor: pointer; line-height: 1.3; }
.selected-tram-item .acts { flex: 0 0 auto; display: flex; gap: 2px; }
.selected-tram-item .acts button { border: none; background: #f1f1f1; color: #555; width: 24px; height: 24px; border-radius: 4px; cursor: pointer; font-size: 11px; line-height: 1; }
.selected-tram-item .acts button:hover:not([disabled]) { background: #e0e0e0; }
.selected-tram-item .acts button[disabled] { opacity: .35; cursor: default; }
.selected-tram-item .acts .st-rm { color: #c0392b; }

/* ---- Stage tab remove button ---- */
.stage-tab-remove { border: none; background: transparent; color: #c0392b; font-size: 16px; line-height: 1; cursor: pointer; margin-left: 4px; }

/* ---- PDF preview technical rows ---- */
.route-preview-technical .rpt-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #eee; font-size: 13px; }
.route-preview-technical .rpt-row span { color: #777; }
.route-preview-technical .rpt-row strong { color: #1a1a1a; }
.route-preview-map { width: 100%; height: 260px; border-radius: 6px; overflow: hidden; }

/* ---- Map popup card: "Afegeix a la ruta" button ---- */
.tram-rutes-popup .tram-popup-add {
    display: inline-block;
    margin-top: 6px;
    margin-left: 8px;
    padding: 5px 12px;
    background: #007F6F;
    color: #fff !important;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.tram-rutes-popup .tram-popup-add:hover { background: #006558; }

/* ---- Mode pills active state (in case override CSS lacks it) ---- */
#modeToggle a.active { background: #007F6F; color: #fff; }
#modeToggle a.active img { filter: brightness(0) invert(1); }
