/*
 * =========================================================
 * MEJENGAWEB - ACADEMY PRO POPUP
 * =========================================================
 */

#map .mw-academy-pro-popup {
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17202a;
}


/* =========================
   HERO
   ========================= */

#map .mw-academy-pro-hero {
    position: relative;
    overflow: hidden;

    min-height: 82px;

    margin: -1px -1px 9px;
    padding: 13px;

    border-radius: 14px;

    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(255,255,255,.20),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #092d24,
            #0b8060
        );

    color: #fff;
}


#map .mw-academy-pro-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}


#map .mw-academy-pro-logo {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 2px solid rgba(255,255,255,.92);
    border-radius: 50%;

    background: #fff;

    box-shadow:
        0 4px 14px
        rgba(0,0,0,.20);
}


#map .mw-academy-pro-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


#map .mw-academy-pro-logo i {
    color: #0b8060;
    font-size: 21px;
}


#map .mw-academy-pro-title {
    flex: 1;
    min-width: 0;
}


#map .mw-academy-pro-title h3 {
    margin: 0;

    color: #fff;

    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;

    overflow-wrap: anywhere;
}


#map .mw-academy-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    margin-top: 5px;
    padding: 4px 7px;

    border: 1px solid rgba(255,255,255,.30);
    border-radius: 999px;

    background: rgba(255,255,255,.15);

    color: #fff;

    font-size: 9px;
    font-weight: 800;
}


#map .mw-academy-pro-location {
    display: flex;
    align-items: flex-start;
    gap: 5px;

    margin-top: 7px;

    color: rgba(255,255,255,.90);

    font-size: 9px;
    line-height: 1.3;
}


/* =========================
   DESCRIPCION
   ========================= */

#map .mw-academy-pro-description {
    margin: 8px 2px;

    color: #5d6772;

    font-size: 10px;
    line-height: 1.42;

    text-align: left;
}


/* =========================
   INFO
   ========================= */

#map .mw-academy-pro-info-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 5px;

    margin: 8px 0;
}


#map .mw-academy-pro-info {
    min-width: 0;

    padding: 7px 4px;

    border: 1px solid #e3e8ed;
    border-radius: 10px;

    background: #f8fafb;

    text-align: center;
}


#map .mw-academy-pro-info i {
    display: block;

    margin-bottom: 3px;

    color: #087f5b;

    font-size: 13px;
}


#map .mw-academy-pro-info strong {
    display: block;

    color: #26323c;

    font-size: 9px;
}


#map .mw-academy-pro-info span {
    display: block;

    margin-top: 2px;

    color: #66727d;

    font-size: 8px;
    line-height: 1.25;

    overflow-wrap: anywhere;
}


/* =========================
   PRECIOS
   ========================= */

#map .mw-academy-pro-price-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 6px;

    margin: 8px 0;
}


#map .mw-academy-pro-price {
    padding: 7px;

    border: 1px solid #cfe8dc;
    border-radius: 10px;

    background: #eef9f4;

    text-align: center;
}


#map .mw-academy-pro-price:nth-child(2) {
    border-color: #d5e5f5;
    background: #f0f7ff;
}


#map .mw-academy-pro-price span {
    display: block;

    color: #66727d;

    font-size: 8px;
}


#map .mw-academy-pro-price strong {
    display: block;

    margin-top: 2px;

    color: #087f5b;

    font-size: 13px;
    font-weight: 900;
}


#map .mw-academy-pro-price:nth-child(2) strong {
    color: #146ebe;
}


/* =========================
   METRICAS
   ========================= */

#map .mw-academy-pro-metrics {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 6px;

    margin: 8px 0;
}


#map .mw-academy-pro-metric {
    padding: 7px 4px;

    border: 1px solid #e1e6eb;
    border-radius: 10px;

    background: #fff;

    text-align: center;
}


#map .mw-academy-pro-metric i {
    margin-right: 4px;
    color: #087f5b;
}


#map .mw-academy-pro-metric strong {
    font-size: 13px;
}


#map .mw-academy-pro-metric span {
    display: block;

    margin-top: 2px;

    color: #73808b;

    font-size: 8px;
}


#map .mw-academy-like {
    cursor: pointer;
    user-select: none;

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}


#map .mw-academy-like:hover {
    transform: translateY(-1px);
}


/* =========================
   BOTONES
   ========================= */

#map .mw-academy-pro-actions {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 5px;

    margin: 8px 0;
}


#map .mw-academy-pro-action {
    min-width: 0;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    padding: 0 5px;

    border: 0;
    border-radius: 8px;

    color: #fff !important;

    font-size: 8.5px;
    font-weight: 700;

    text-decoration: none !important;

    cursor: pointer;
}


#map .mw-academy-pro-action.whatsapp {
    background: #25d366;
}


#map .mw-academy-pro-action.waze {
    background: #2d9bf0;
}


#map .mw-academy-pro-action.website {
    background: #6f42c1;
}


/* =========================
   CONTACTO / REDES
   ========================= */

#map .mw-academy-pro-contact {
    margin: 8px 0 4px;
}


#map .mw-academy-pro-contact-row {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 6px 7px;

    border-bottom: 1px solid #edf0f2;

    color: #525f6b;

    font-size: 9px;

    text-align: left;
}


#map .mw-academy-pro-contact-row i {
    width: 15px;

    color: #087f5b;

    text-align: center;
}


#map .mw-academy-pro-social {
    display: flex;
    flex-wrap: wrap;

    gap: 5px;

    margin-top: 7px;
}


#map .mw-academy-pro-social a {
    width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e0e6eb;
    border-radius: 8px;

    background: #fff;

    color: #44515c;

    text-decoration: none;
}


/* =========================
   DETAILS
   ========================= */

#map .mw-academy-pro-details {
    margin-top: 8px;

    border-top: 1px solid #e7ebef;

    text-align: left;
}


#map .mw-academy-pro-details summary {
    padding: 8px 2px 2px;

    color: #33414d;

    font-size: 9px;
    font-weight: 800;

    cursor: pointer;
}


#map .mw-academy-pro-details-content {
    padding: 6px 2px 1px;

    color: #66727d;

    font-size: 9px;
    line-height: 1.45;
}


/* =========================
   MOVIL
   ========================= */

@media (max-width: 480px) {

    #map .mw-academy-pro-popup {
        width:
            min(
                320px,
                calc(100vw - 46px)
            );
    }

    #map .mw-academy-pro-hero {
        min-height: 76px;
    }
}


/* =========================================================
   MW FIELD + ACADEMY GUIDE LINES
   ========================================================= */

/*
 * Líneas visuales desde el punto geográfico real
 * hacia la posición desplazada de cada marcador.
 *
 * No reciben eventos y no modifican geometría persistida.
 */

.leaflet-overlay-pane .mw-field-guide-line {
    stroke: rgba(18, 32, 43, 0.78);
    stroke-width: 2;
    stroke-dasharray: 4 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.leaflet-overlay-pane .mw-academy-guide-line {
    stroke: rgba(32, 197, 229, 0.82);
    stroke-width: 1.6;
    stroke-dasharray: 3 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
