/* Partner Directory Plugin — partner-directory.css */

:root {
  --pd-teal-bg:   #d4f0ed;
  --pd-teal-map:  #5bbfb5;
  --pd-teal-dark: #2a8f87;
  --pd-teal-btn:  #3a8f8a;
  --pd-ocean:     #b8e8e4;
  --pd-coral:     #f05a38;
  --pd-coral-lt:  #ff7a5a;
  --pd-text-dark: #1a2e2d;
  --pd-text-mid:  #3d5a58;
}

/* ── Wrapper ─────────────────────────────────────────── */
.pd-wrap {
  background: var(--pd-teal-bg);
  border-radius: 20px;
  padding: 52px 56px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Left panel ──────────────────────────────────────── */
.pd-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  color: var(--pd-text-dark);
  line-height: 1.15;
  margin: 0 0 14px;
}

.pd-subtitle {
  font-size: 14px;
  color: var(--pd-text-mid);
  line-height: 1.75;
  margin: 0 0 24px;
  max-width: 380px;
}

/* ── Filter buttons ──────────────────────────────────── */
.pd-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.pd-filter-btn {
  padding: 9px 22px;
  border-radius: 50px;
  border: none;
  background: var(--pd-teal-btn);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.pd-filter-btn:hover {
  background: var(--pd-teal-dark);
  transform: translateY(-1px);
}
.pd-filter-btn.active {
  background: var(--pd-coral);
  box-shadow: 0 4px 16px rgba(240, 90, 56, .3);
}

/* ── Search ──────────────────────────────────────────── */
.pd-search-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  border: 2px solid var(--pd-coral);
  overflow: hidden;
  max-width: 400px;
  box-shadow: 0 2px 14px rgba(240, 90, 56, .1);
}

.pd-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--pd-text-dark);
  background: transparent;
}
.pd-search-input::placeholder { color: #aac5c3; }

.pd-search-btn {
  background: var(--pd-coral);
  border: none;
  color: #fff;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.pd-search-btn:hover { background: var(--pd-coral-lt); }

/* ── Result count ────────────────────────────────────── */
.pd-result-count {
  margin-top: 10px;
  font-size: 13px;
  color: var(--pd-teal-dark);
  font-weight: 500;
  min-height: 20px;
}

/* ── Legend ──────────────────────────────────────────── */
.pd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}
.pd-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--pd-text-mid);
  font-weight: 500;
}
.pd-legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--pd-teal-btn); /* overridden by JS per type */
}

/* Legend dot colors by type */
.pd-legend-item[data-type="technology"] .pd-legend-dot { background: #3a8f8a; }
.pd-legend-item[data-type="agency"]     .pd-legend-dot { background: #f05a38; }
.pd-legend-item[data-type="service"]    .pd-legend-dot { background: #f0a030; }

/* ── Map container ───────────────────────────────────── */
.pd-map-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
}

#pd-map-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  filter: drop-shadow(0 4px 24px rgba(42, 143, 135, .18));
}

/* D3 styles */
.pd-country  { fill: var(--pd-teal-map); stroke: #a8ddd8; stroke-width: .5; transition: fill .2s; }
.pd-country:hover { fill: #4aafa5; }
.pd-graticule { fill: none; stroke: rgba(255,255,255,.15); stroke-width: .3; }
.pd-sphere    { fill: var(--pd-ocean); }

/* ── Pins ────────────────────────────────────────────── */
.pd-pin-group { cursor: pointer; }
.pd-pin-group:hover .pd-pin-body { filter: brightness(1.15); }

.pd-pin-anim {
  animation: pd-pin-drop .5s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes pd-pin-drop {
  from { transform: translateY(-18px) scale(.4); opacity: 0; }
  to   { transform: translateY(0) scale(1);      opacity: 1; }
}

/* ── Tooltip ─────────────────────────────────────────── */
.pd-tooltip {
  position: absolute;
  background: #fff;
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pd-text-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .14);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  white-space: nowrap;
  z-index: 20;
  transform: translate(-50%, -100%);
}
.pd-tooltip.show { opacity: 1; }
.pd-tooltip span { font-weight: 400; color: #888; }

/* ── Loading state ───────────────────────────────────── */
.pd-map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  color: var(--pd-teal-dark);
  font-size: 14px;
  gap: 10px;
}
.pd-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--pd-teal-map);
  border-top-color: var(--pd-teal-dark);
  border-radius: 50%;
  animation: pd-spin .7s linear infinite;
}
@keyframes pd-spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .pd-wrap {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 28px;
  }
  .pd-subtitle { max-width: 100%; }
}
@media (max-width: 480px) {
  .pd-filter-btn  { padding: 8px 16px; font-size: 12.5px; }
  .pd-search-btn  { padding: 12px 18px; }
}

/* ── Responsive ──────────────────────────────────────── */

#pd-map-wrap{
  position: relative;
}

#pd-map-svg{
  position: relative;
  z-index: 1;
}

#pd-map-overlay-loader{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

#pd-map-overlay-loader.active{
  opacity: 1;
  visibility: visible;
}

.pd-overlay-spinner{
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0,0,0,0.15) !important;
  border-top: 4px solid #f37822 !important;
  border-radius: 50% !important;
  animation: pdspin 0.7s linear infinite;
}

@keyframes pdspin{
  to{
    transform: rotate(360deg);
  }
}

