/* ==========================================================================
   Biodata — Employment Agency section + sticky bottom contact bar
   Loaded only when the biodata node has a viewable managing agency
   (library attached in biodata_display_preprocess_node()).
   ========================================================================== */

/* Keep the fixed contact bar from covering the end of the page. Fallback:
   pad the card itself; with :has() support, pad the whole page so regions
   below the node (site footer etc.) stay reachable too. */
.biodata-card {
  margin-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}
@supports selector(:has(*)) {
  .biodata-card {
    margin-bottom: 1.5rem;
  }
  body:has(.bdc-contact-bar) {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Agency info section ────────────────────────────────── */
.bdc-agency {
  padding: 1.5rem 2rem 1.75rem;
  background: #fafaf8;
  border-top: 1px solid #e9e9e4;
}

.bdc-agency-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
}

.bdc-agency-info {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}

.bdc-agency-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
}

.bdc-agency-licence {
  font-size: .8rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: .02em;
}

.bdc-agency-address,
.bdc-agency-hours {
  font-size: .85rem;
  color: #4b5563;
}

.bdc-agency-address p,
.bdc-agency-hours p {
  margin: 0;
}

.bdc-agency-website {
  font-size: .85rem;
  font-weight: 600;
  color: #0f766e;
  text-decoration: none;
}
.bdc-agency-website:hover { text-decoration: underline; }

/* Inline contact links (desktop-friendly duplicate of the bar) */
.bdc-agency-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.bdc-contact-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  transition: filter .15s, transform .1s;
}
.bdc-contact-link:hover { filter: brightness(1.08); transform: translateY(-1px); }
.bdc-contact-link:active { transform: translateY(0); }
.bdc-contact-link svg { flex-shrink: 0; width: 16px; height: 16px; }

.bdc-contact-link--whatsapp { background: #25d366; }
.bdc-contact-link--call     { background: #0ea5e9; }
.bdc-contact-link--email    { background: #6b7280; }
.bdc-contact-link--facebook { background: #1877f2; }

/* ── Sticky bottom contact bar ──────────────────────────── */
.bdc-contact-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 990;
  display: flex;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bdc-contact-bar-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .55rem .25rem .5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  font-size: .7rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  transition: background .15s;
}
.bdc-contact-bar-btn:hover { background: #f3f4f6; }
.bdc-contact-bar-btn svg { width: 22px; height: 22px; }

.bdc-contact-bar-btn--whatsapp { color: #16a34a; }
.bdc-contact-bar-btn--call     { color: #0284c7; }
.bdc-contact-bar-btn--email    { color: #4b5563; }
.bdc-contact-bar-btn--facebook { color: #1877f2; }

/* Wider screens: bar keeps to card width feel, buttons row layout */
@media (min-width: 768px) {
  .bdc-contact-bar-btn {
    flex-direction: row;
    gap: .5rem;
    padding: .8rem .5rem;
    font-size: .85rem;
  }
  .bdc-contact-bar-btn svg { width: 18px; height: 18px; }
}
