/* Copyright 2026 AbilitySoft. All rights reserved.
   Developed for InstaFreight, Inc. under license agreement. */

/* IFMap — shared look for every map (app/static/js/if_map.js). Light mode only. */
.if-map{position:relative;overflow:hidden;border-radius:1rem;background:#eef2f7;isolation:isolate;min-height:180px}
.if-map .maplibregl-canvas{outline:none}
.if-map-offline{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1rem;text-align:center;color:#64748b;font-size:.8125rem;background:#f8fafc}
.if-map-offline i{font-size:1.5rem;color:#94a3b8}

/* Controls */
.if-map .maplibregl-ctrl-group{border-radius:.75rem;overflow:hidden;box-shadow:0 4px 14px rgba(15,23,42,.12);border:1px solid #e2e8f0}
.if-map .maplibregl-ctrl-group button{width:34px;height:34px}
.if-map .maplibregl-ctrl-group button+button{border-top:1px solid #eef2f7}
.if-map .maplibregl-ctrl-attrib{font-size:11px;background:rgba(255,255,255,.85);border-radius:.5rem}
.if-map .maplibregl-ctrl-top-right{top:.25rem;right:.25rem}

/* Pins */
.if-map-pin{display:flex;align-items:center;gap:.35rem;cursor:pointer}
.if-map-pin__dot{display:block;border-radius:9999px;border:3px solid #fff;box-shadow:0 2px 8px rgba(15,23,42,.3);transition:transform .15s ease}
.if-map-pin:hover .if-map-pin__dot{transform:scale(1.15)}
.if-map-pin__icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:9999px;border:2px solid #fff;color:#fff;font-size:12px;box-shadow:0 3px 10px rgba(15,23,42,.3)}
.if-map-pin__label{position:absolute;left:100%;margin-left:.35rem;white-space:nowrap;padding:.1rem .45rem;border-radius:.4rem;background:#fff;color:#0f172a;font-size:11px;font-weight:700;box-shadow:0 2px 6px rgba(15,23,42,.18)}
.maplibregl-marker.if-map-pin{position:absolute}

/* Popups */
.if-map .maplibregl-popup-content,.if-map-popup .maplibregl-popup-content{border-radius:.9rem;padding:.75rem .85rem;box-shadow:0 12px 30px rgba(15,23,42,.18);border:1px solid #e2e8f0;font-family:inherit}
.if-map .maplibregl-popup-close-button,.if-map-popup .maplibregl-popup-close-button{font-size:16px;width:24px;height:24px;color:#64748b;border-radius:.4rem}
.if-map-card{min-width:150px}
.if-map-card__title{font-weight:800;color:#0f172a;font-size:.8125rem;line-height:1.25}
.if-map-card__sub{color:#64748b;font-size:.75rem;margin-top:.2rem;line-height:1.35}
.if-map-card__cta{display:block;margin-top:.55rem;text-align:center;padding:.35rem .6rem;border-radius:9999px;background:#b71c1c;color:#fff!important;font-size:11px;font-weight:700;text-decoration:none}
.if-map-card__cta:hover{background:#b71c1c}

@media (max-width:640px){
  .if-map{border-radius:.85rem}
  .if-map .maplibregl-ctrl-group button{width:38px;height:38px}
}

/* Address search dropdown (IFMap.attachSearch) */
.if-map-results{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:60;max-height:260px;overflow:auto;background:#fff;border:1px solid #e2e8f0;border-radius:.85rem;box-shadow:0 14px 34px rgba(15,23,42,.16);padding:.25rem}
.if-map-results.hidden{display:none}
.if-map-result{display:flex;align-items:flex-start;gap:.5rem;width:100%;text-align:left;padding:.5rem .6rem;border-radius:.6rem;font-size:.78rem;line-height:1.35;color:#334155;background:transparent;border:0;cursor:pointer}
.if-map-result:hover{background:#f1f5f9}
.if-map-result i{color:#b71c1c;margin-top:.15rem;font-size:.7rem}
.if-map-result--empty{color:#94a3b8;cursor:default}
