/* Ameriteam OS v261 — uniform map cards, dialogs, Bid Room panels and async status. */
:root{
  --amt-ui-radius:10px;
  --amt-ui-border:#dbe2ec;
  --amt-ui-navy:#14265b;
  --amt-ui-red:#c31f35;
  --amt-ui-muted:#68758b;
  --amt-ui-shadow:0 14px 36px rgba(20,38,91,.18);
}

/* Vendor map popup: one predictable card system regardless of contact count. */
.amt230-vendor-map-panel .leaflet-popup-content-wrapper{
  border:1px solid var(--amt-ui-border);
  border-radius:var(--amt-ui-radius);
  box-shadow:var(--amt-ui-shadow);
  overflow:hidden;
}
.amt230-vendor-map-panel .leaflet-popup-content{margin:0!important;width:auto!important}
.amt230-leaflet-popup{
  box-sizing:border-box;
  width:420px;
  max-width:calc(100vw - 112px);
  padding:18px;
}
.amt230-leaflet-popup h3{padding-right:38px;min-height:22px;font-size:16px;line-height:1.35}
.amt230-popup-trade{min-height:17px;margin:2px 0 12px}
.amt230-popup-details,.amt240-popup-contacts{width:100%;box-sizing:border-box}
.amt230-popup-details>div{min-height:42px;align-items:center;padding:9px 11px}
.amt240-popup-contacts{gap:8px;max-height:248px;margin-bottom:12px}
.amt240-popup-contact{
  box-sizing:border-box;
  min-height:92px;
  padding:12px;
  border-color:var(--amt-ui-border);
  border-radius:8px;
  align-content:start;
}
.amt240-popup-contact strong{min-height:16px;font-size:12px;line-height:1.35}
.amt240-popup-contact span{min-height:15px;line-height:1.35}
.amt240-popup-contact a{min-height:15px;line-height:1.35}
.amt230-popup-actions{min-height:34px;align-items:center}
.amt230-leaflet-popup button{min-height:32px;padding:7px 11px;border-radius:7px}

/* Leaflet's close control becomes an obvious Ameriteam action, not a tucked-away glyph. */
.amt230-vendor-map-panel .leaflet-popup-close-button{
  top:12px!important;
  right:12px!important;
  display:grid!important;
  place-items:center;
  width:30px!important;
  height:30px!important;
  padding:0!important;
  border:1px solid #e2a6af!important;
  border-radius:8px!important;
  background:#fff3f5!important;
  color:var(--amt-ui-red)!important;
  font:800 22px/1 Arial,sans-serif!important;
  text-decoration:none!important;
  box-shadow:0 2px 7px rgba(195,31,53,.12);
}
.amt230-vendor-map-panel .leaflet-popup-close-button:hover,
.amt230-vendor-map-panel .leaflet-popup-close-button:focus-visible{
  background:var(--amt-ui-red)!important;
  color:#fff!important;
  outline:3px solid rgba(195,31,53,.18);
}

/* Uniform cards and close actions across the SaaS shell and Bid Room. */
.amt195-card,.amt195-doc,.amt195-table-wrap,.amt195-report,
#amt195-bid-room .amt249-level-card,
#amt195-bid-room .amt249-actions>div{
  border-color:var(--amt-ui-border)!important;
  border-radius:var(--amt-ui-radius)!important;
}
#amt195-bid-room .amt249-actions{align-items:stretch}
#amt195-bid-room .amt249-actions>div{box-sizing:border-box;min-height:150px;height:100%}
#amt195-bid-room .amt195-proposal-grid{align-items:stretch}
#amt195-bid-room .amt195-proposal-card{box-sizing:border-box;height:100%;min-height:330px}
.amt195-x,.amt230-close,.modal-close,.dialog-close{
  flex:0 0 34px;
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  border:1px solid #e2a6af!important;
  border-radius:8px!important;
  background:#fff3f5!important;
  color:var(--amt-ui-red)!important;
  font-size:22px!important;
  line-height:1!important;
}
.amt195-x:hover,.amt230-close:hover,.modal-close:hover,.dialog-close:hover{
  background:var(--amt-ui-red)!important;
  color:#fff!important;
}

/* Persistent, non-blocking status for AI and other operations that take time. */
#amt261-work-status{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:2147483000;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 28px;
  gap:11px;
  align-items:center;
  width:min(390px,calc(100vw - 32px));
  box-sizing:border-box;
  padding:13px 13px 13px 15px;
  border:1px solid #cfd8e6;
  border-left:4px solid var(--amt-ui-red);
  border-radius:11px;
  background:rgba(255,255,255,.98);
  box-shadow:0 18px 48px rgba(20,38,91,.24);
  color:#17254f;
  font-family:'DM Sans',sans-serif;
  transform:translateY(16px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
#amt261-work-status[data-visible="true"]{transform:none;opacity:1;pointer-events:auto}
#amt261-work-status[data-tone="success"]{border-left-color:#23835a}
#amt261-work-status[data-tone="error"]{border-left-color:#a7192e}
.amt261-work-spinner{
  width:28px;height:28px;box-sizing:border-box;border:3px solid #e2e7ef;
  border-top-color:var(--amt-ui-red);border-radius:50%;animation:amt261-spin .85s linear infinite;
}
#amt261-work-status[data-tone="success"] .amt261-work-spinner{animation:none;border:0;background:#e8f6ee;color:#23835a}
#amt261-work-status[data-tone="success"] .amt261-work-spinner::after{content:'✓';display:grid;place-items:center;height:28px;font-weight:900}
.amt261-work-copy{min-width:0}
.amt261-work-copy strong{display:block;font-size:13px;line-height:1.3;color:var(--amt-ui-navy)}
.amt261-work-copy small{display:block;margin-top:3px;color:var(--amt-ui-muted);font-size:11px;line-height:1.35}
.amt261-work-close{display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:7px;background:transparent;color:#69758b;font-size:19px;cursor:pointer}
.amt261-work-close:hover{background:#f1f3f7;color:var(--amt-ui-navy)}
@keyframes amt261-spin{to{transform:rotate(360deg)}}
@media(max-width:600px){
  .amt230-leaflet-popup{width:min(360px,calc(100vw - 76px));padding:16px}
  #amt261-work-status{right:16px;bottom:16px}
}
@media(prefers-reduced-motion:reduce){.amt261-work-spinner{animation-duration:1.6s}#amt261-work-status{transition:none}}
