/* Ferramentas do mapa geral e status da renderização. */
.map-toolbox-panel {
    position: absolute;
    top: 92px;
    right: 18px;
    z-index: 1100;
    font-family: 'Outfit', system-ui, sans-serif;
}

.map-toolbox-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 12px;
    padding: 10px 13px;
    background: rgba(255,255,255,.94);
    color: #1e3a5f;
    font: 800 12px 'Outfit', system-ui, sans-serif;
    box-shadow: 0 8px 24px rgba(15,23,42,.18);
    cursor: pointer;
}

.map-toolbox-trigger:hover,
.map-toolbox-trigger[aria-expanded="true"] { background: #0f4c81; color: #fff; }

.map-toolbox-menu {
    width: 252px;
    max-height: calc(100vh - 154px);
    overflow-y: auto;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid rgba(148,163,184,.32);
    border-radius: 14px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 18px 42px rgba(15,23,42,.22);
    backdrop-filter: blur(14px);
}

.map-toolbox-title,
.map-toolbox-section-title {
    color: #475569;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.map-toolbox-title { margin: 0 2px 4px; color: #64748b; letter-spacing: .08em; }
.map-toolbox-description { margin: 0 2px 12px; color: #64748b; font-size: 11px; line-height: 1.35; }
.map-toolbox-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e8eef5; }
.map-toolbox-section-title { margin: 0 2px 7px; }
.map-toolbox-section-title i { width: 13px; color: #2563eb; }

.map-toolbox-help,
.map-toolbox-footer { margin: 8px 2px 0; color: #64748b; font-size: 10px; line-height: 1.35; }
.map-toolbox-help i,
.map-toolbox-footer i { color: #2563eb; }
.map-toolbox-footer { padding-top: 9px; border-top: 1px solid #e8eef5; }

.map-quality-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 2px 0;
    padding: 7px 8px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    font-size: 9px;
    font-weight: 800;
}

.map-quality-summary.is-warning { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.map-toolbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.map-toolbox-grid button {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 7px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 9px;
    background: #f8fafc;
    color: #334155;
    font: 700 11px 'Outfit', system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
}

.map-toolbox-grid button:hover,
.map-toolbox-grid button.active { border-color: #60a5fa; background: #eff6ff; color: #1d4ed8; }
.map-toolbox-grid button.is-working { cursor: progress; opacity: .68; }
.map-toolbox-grid button:disabled { cursor: not-allowed; opacity: .48; }
.map-toolbox-grid button:disabled:hover { border-color: #e2e8f0; background: #f8fafc; color: #64748b; }
.map-toolbox-grid button:focus-visible,
.map-toolbox-trigger:focus-visible { outline: 3px solid rgba(37,99,235,.3); outline-offset: 2px; }
.map-toolbox-grid i { width: 14px; text-align: center; }

@media (max-width: 700px) {
    .map-toolbox-panel { top: 78px; right: 10px; }
    .map-toolbox-menu { width: min(300px, calc(100vw - 24px)); max-height: calc(100vh - 128px); }
}
