/*
 * Leaflet popup — card style
 *
 * Sobrescribimos los estilos por defecto de Leaflet (.leaflet-popup-*)
 * y definimos los componentes propios de la card.
 *
 * Requisito: cargar este CSS después de leaflet.css.
 */

/* ── Reset del contenedor Leaflet ──────────────────────────────────────────── */

.leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;       /* garantiza que border-radius recorte los hijos */
    min-width: 220px;
    max-width: 280px;
}

/* Elimina el padding interno que Leaflet añade por defecto */
.leaflet-popup-content {
    margin: 0;
    width: auto !important;  /* Leaflet fuerza un width; lo anulamos */
}

/* Cola del popup */
.leaflet-popup-tip-container {
    margin-top: -1px;        /* solapa 1 px con el borde inferior de la card */
}

.leaflet-popup-tip {
    box-shadow: none;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
}

/* Botón de cierre */
.leaflet-popup-close-button {
    top: 10px !important;
    right: 10px !important;
    color: #888 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    width: 20px !important;
    height: 20px !important;
}

.leaflet-popup-close-button:hover {
    color: #333 !important;
    background: transparent !important;
}


/* ── Card body ─────────────────────────────────────────────────────────────── */

.mp-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #1a1a1a;
}

/* Zona de texto: título + descripción + dirección */
.mp-popup__body {
    padding: 14px 16px 12px;
}

.mp-popup__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    line-height: 1.3;

    /* Reservamos espacio para el botón de cierre */
    padding-right: 20px;
}

.mp-popup__desc {
    margin: 0 0 10px;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

/* ── Dirección ─────────────────────────────────────────────────────────────── */

.mp-popup__address,
.mp-popup__event {
    display: flex;
    gap: 7px;
    align-items: flex-start;
}

.mp-popup__event {
    margin: .5rem 0;
}

.mp-popup__address-icon,
.mp-popup__event-icon,
.mp-popup__event-time-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    color: #999;

    /*
     * Icono SVG inline del pin (sin dependencias externas).
     * Si usas Font Awesome / Tabler Icons puedes reemplazarlo por
     * <i class="ti ti-map-pin"></i> y eliminar este ::before.
     */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21C12 21 5 13.5 5 8.5a7 7 0 0 1 14 0c0 5-7 12.5-7 12.5Z'/%3E%3Ccircle cx='12' cy='8.5' r='2.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.mp-popup__event-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M4 11h16'/%3E%3C/svg%3E");
}
.mp-popup__event-time-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4l2.5 2.5'/%3E%3C/svg%3E");
}

.mp-popup__address-text,
.mp-popup__event-text {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

.mp-popup__address-street {
    display: block;
    font-weight: 600;
    font-size: 12px;
    color: #1a1a1a;
}

.mp-popup__address-extra {
    /* Código postal · Barrio/ciudad en color muted */
    color: #888;
}


/* ── Separador ─────────────────────────────────────────────────────────────── */

.mp-popup__divider {
    height: 0.5px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0;
}


/* ── Barra de acciones ─────────────────────────────────────────────────────── */

.mp-popup__actions {
    display: flex;
    align-items: stretch;
}

.mp-popup__action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 8px;
    margin-bottom: 9px;

    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    white-space: nowrap;

    background: transparent;
    border: none !important;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mp-popup__action-btn:hover {
    color: rgba(0, 0, 0, 0.7) !important;
    text-decoration: none !important;
}

/* Separador vertical entre botones */
.mp-popup__action-sep {
    width: 0.5px;
    background: rgba(0, 0, 0, 0.08);
    align-self: stretch;
    margin: 6px 0;
}

/* Colores específicos por proveedor */
.mp-popup__action-btn--google {
    color: #1a73e8;
}

.mp-popup__action-btn--apple {
    color: #333;
}

/* Icono SVG dentro de los botones (opcional; usa tus iconos propios) */
.mp-popup__action-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
