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

:root {
  --pd-teal-bg:   #eafbf9;
  --pd-teal-map:  #5bbfb5;
  --pd-teal-dark: linear-gradient(180deg, rgba(94, 201, 196, 1) 0%, rgba(26, 68, 117, 1) 100%);
  --pd-teal-btn:  linear-gradient(180deg, rgba(94, 201, 196, 1) 0%, rgba(26, 68, 117, 1) 100%);
  --pd-ocean:     #eafbf9;
  --pd-coral:     linear-gradient(180deg,rgba(243, 120, 34, 1) 0%, rgba(228, 94, 157, 1) 100%);
  --pd-coral-lt:  #ff7a5a;
  --pd-text-dark: #595959;
  --pd-text-mid:  #595959;
}

/* ── Wrapper ─────────────────────────────────────────── */
.pd-wrap {
  background: #eafbf9;
  border-radius: 20px;
  padding: 0 !important;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Fira Sans',Helvetica,Arial,Lucida,sans-serif;
}

/* ── Left panel ──────────────────────────────────────── */
.pd-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: #595959 !important;
  line-height: 1.15;
  margin: 0 0 14px;
}

.pd-subtitle {
  font-size: 16px;
  color: #595959 !important;
  line-height: 1.75;
  margin: 0 0 24px;
  max-width: 450px;
}

/* ── 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: linear-gradient(180deg, rgba(94, 201, 196, 1) 0%, rgba(26, 68, 117, 1) 100%) !important;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.pd-filter-btn:hover {
  background: linear-gradient(180deg, rgba(94, 201, 196, 1) 0%, rgba(26, 68, 117, 1) 100%) !important;
  transform: translateY(-1px);
}
.pd-filter-btn.active {
  background: linear-gradient(180deg,rgba(243, 120, 34, 1) 0%, rgba(228, 94, 157, 1) 100%) !important;
  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: #fff;
  outline: none;
  padding: 12px 20px !important;
  font-size: 14px;
  color: var(--pd-text-dark);
  background: transparent;
}
.pd-search-input::placeholder { color: #aac5c3; }

.pd-search-btn {
  background: linear-gradient(180deg,rgba(243, 120, 34, 1) 0%, rgba(228, 94, 157, 1) 100%) !important;
  border: none;
  color: #fff;
  padding: 12px 26px;
  font-size: 14px;
  margin: 4px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.pd-search-btn:hover { 
  background: var(--pd-coral-lt); 
}

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

/* ── Legend ──────────────────────────────────────────── */
.pd-legend {
  display: none !important;
  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: unset !important;
}

/* 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: #eafbf9 !important; }

/* ── 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: 0 !important;
    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; }
}
