.ldh-wrapper,
.ldh-wrapper *,
.ldh-wrapper *::before,
.ldh-wrapper *::after {
    box-sizing: border-box;
}

.ldh-wrapper {
    margin: 20px 0 32px;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.55;
    max-width: 100%;
}

.ldh-wrapper.is-fullscreen {
    position: fixed;
    inset: 12px;
    z-index: 99999;
    margin: 0;
    padding: 20px;
    background: #ffffff;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

/* Banner superior verde */
.ldh-update-banner {
    background: #edf7ed;
    border-left: 4px solid #166534;
    color: #14532d;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 18px;
}

/* Caixa de Resumo SEO */
.ldh-seo-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 28px;
}

.ldh-seo-title {
    margin: 0 0 12px !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
}

.ldh-wrapper br {
    display: none !important;
}

.ldh-seo-list {
    margin: 0 0 16px !important;
    padding-left: 22px !important;
    list-style-type: disc !important;
}

.ldh-seo-list li,
.ldh-seo-list li.ldh-seo-line {
    display: list-item !important;
    width: 100% !important;
    margin-bottom: 8px;
    font-size: 0.98rem;
    color: #1e293b;
}

.ldh-seo-list li strong {
    color: #0f172a;
    font-weight: 700;
}

.ldh-next-departure {
    background: #edf7ed;
    border: 1px solid #86efac;
    color: #15803d;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.98rem;
    margin-bottom: 14px;
}

.ldh-seo-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ldh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ldh-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.ldh-copy-feedback {
    font-size: 0.88rem;
    font-weight: 600;
    color: #15803d;
}

/* Títulos principais das seções */
.ldh-main-heading {
    margin: 28px 0 14px !important;
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
}

.ldh-sub-heading {
    margin: 20px 0 12px !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
}

/* Mapa Leaflet */
.ldh-map-section {
    margin: 24px 0 30px;
}

.ldh-map-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.ldh-map-header .ldh-main-heading {
    margin: 0 !important;
}

.ldh-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ldh-map-iframe-wrap,
.ldh-map {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #e2e8f0;
    position: relative;
    z-index: 1;
}

.ldh-ref-inline {
    font-size: 0.86rem;
    font-weight: 400;
    color: #166534;
}

.ldh-search-empty {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

.ldh-map-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 0.95rem;
}

.ldh-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    font-size: 0.88rem;
    color: #334155;
}

.ldh-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ldh-swatch {
    display: inline-block;
    width: 16px;
    height: 4px;
    border-radius: 2px;
}

/* Grade de Horários (pílulas estilo referência) */
.ldh-schedules-section {
    margin: 24px 0 30px;
}

.ldh-schedule-group {
    margin-bottom: 22px;
}

.ldh-times-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ldh-time-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 96px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ldh-time-pill .ldh-time-badge {
    display: none;
}

.ldh-time-pill.is-next {
    background: #15803d;
    border-color: #15803d;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(21, 128, 61, 0.25);
}

.ldh-time-pill.is-next .ldh-time-badge {
    display: inline-block;
    background: #ffffff;
    color: #15803d;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    line-height: 1.25;
}

.ldh-ref-notice {
    margin-top: 16px;
    background: #edf7ed;
    border-left: 4px solid #16a34a;
    border-top: 1px solid #bbf7d0;
    border-right: 1px solid #bbf7d0;
    border-bottom: 1px solid #bbf7d0;
    color: #15803d;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.94rem;
    line-height: 1.5;
}

/* Caixa de busca e lista numérica do itinerário */
.ldh-itinerarios-section {
    margin: 28px 0;
}

.ldh-search-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
}

.ldh-search-label {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.ldh-search {
    width: 100%;
    max-width: 540px;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.96rem;
    background: #ffffff;
    color: #0f172a;
}

.ldh-search:focus {
    outline: none;
    border-color: #15803d;
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

.ldh-sentido-section {
    margin-bottom: 26px;
}

ol.ldh-steps-ordered {
    margin: 10px 0 0 !important;
    padding-left: 20px !important;
    list-style-type: decimal !important;
    list-style-position: outside !important;
}

ol.ldh-steps-ordered li.ldh-step {
    display: list-item !important;
    padding: 3px 0 3px 2px !important;
    margin-bottom: 4px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: 1rem;
    color: #111827;
    cursor: pointer;
}

ol.ldh-steps-ordered li.ldh-step::marker {
    font-weight: 400;
    color: #334155;
}

ol.ldh-steps-ordered li.ldh-step:hover,
ol.ldh-steps-ordered li.ldh-step.is-active {
    background: transparent !important;
}

.ldh-rua {
    display: inline !important;
    font-weight: 400 !important;
    color: #111827;
}

.ldh-bairro {
    display: inline-block !important;
    margin-left: 6px;
    font-size: 0.82rem;
    color: #475569;
    background: #f1f5f9;
    padding: 1px 8px;
    border-radius: 4px;
}

/* FAQ SEO */
.ldh-faq-section {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.ldh-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ldh-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    background: #f8fafc;
}

.ldh-faq-item summary {
    font-weight: 700;
    font-size: 0.96rem;
    color: #0f172a;
    cursor: pointer;
}

.ldh-faq-item p {
    margin: 8px 0 0;
    font-size: 0.92rem;
    color: #334155;
}

.ldh-empty {
    color: #475569;
    font-size: 0.95rem;
}

.ldh-post-fonte {
    margin-top: 20px;
    font-size: 0.88rem;
    color: #64748b;
}

/* Linkagem interna de linhas relacionadas */
.ldh-related-nav {
    margin: 28px 0 18px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.ldh-related-nav .ldh-main-heading {
    margin-top: 0 !important;
    font-size: 1.25rem !important;
}

.ldh-hub-link-wrap {
    margin: 0 0 12px;
    font-size: 0.96rem;
    color: #1e293b;
}

.ldh-hub-link-wrap a,
.ldh-related-list a {
    color: #15803d;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ldh-hub-link-wrap a:hover,
.ldh-related-list a:hover {
    color: #166534;
}

.ldh-related-list {
    margin: 0 !important;
    padding-left: 20px !important;
    list-style-type: disc !important;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px 20px;
}

.ldh-related-list li {
    margin: 0 !important;
    font-size: 0.94rem;
    color: #1e293b;
}


/* Página Central / Hub SEO ([hortolandia_todas_linhas]) */
.ldh-hub-wrap {
    margin: 20px 0 32px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #111827;
}

.ldh-hub-filter {
    margin-bottom: 16px;
}

.ldh-hub-filter-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 6px;
}

.ldh-hub-search-input {
    width: 100%;
    max-width: 480px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #0f172a;
    background: #ffffff;
}

.ldh-hub-search-input:focus {
    outline: none;
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.14);
}

.ldh-hub-table-scroll {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.ldh-hub-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.94rem;
}

.ldh-hub-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid #cbd5e1;
    text-align: left;
}

.ldh-hub-table th {
    padding: 12px 14px;
    font-weight: 700;
    color: #0f172a;
}

.ldh-hub-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.12s ease;
}

.ldh-hub-table tbody tr:last-child {
    border-bottom: none;
}

.ldh-hub-table tbody tr:hover {
    background: #f8fafc;
}

.ldh-hub-table td {
    padding: 11px 14px;
    vertical-align: middle;
}

.ldh-hub-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    background: #edf7ed;
    border: 1px solid #bbf7d0;
    color: #14532d;
    font-weight: 700;
    font-size: 0.88rem;
}

.ldh-hub-link {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
}

.ldh-hub-link:hover {
    color: #166534;
    text-decoration: underline;
}

.ldh-hub-range {
    color: #334155;
    font-size: 0.9rem;
    white-space: nowrap;
}

.ldh-hub-map-status {
    color: #475569;
    font-size: 0.88rem;
}


/* Banner de alteração recente detectada (7 dias) */
.ldh-change-alert-banner {
    background: #fefce8;
    border-left: 4px solid #ca8a04;
    border-top: 1px solid #fde047;
    border-right: 1px solid #fde047;
    border-bottom: 1px solid #fde047;
    color: #713f12;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 0.94rem;
    line-height: 1.45;
    margin-bottom: 18px;
}

/* Abas de filtro por dia da semana */
.ldh-schedules-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.ldh-schedules-header .ldh-main-heading {
    margin-bottom: 4px !important;
}

.ldh-day-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.ldh-day-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ldh-day-tab:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.65);
}

.ldh-day-tab.is-active {
    background: #15803d;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(21, 128, 61, 0.25);
}
