/* ============================================================
   ACEC Certification Modal Styles
   Design language: committee.css (Playfair Display headings,
   Raleway body, gold accents, navy text)
   ============================================================ */

/* ── Backdrop ─────────────────────────────────────────────── */
.cert-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 15, 25, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cert-modal-backdrop--visible {
  opacity: 1;
}

/* Prevent body scroll when modal is open */
body.cert-modal-open {
  overflow: hidden;
}

/* ── Dialog ───────────────────────────────────────────────── */
.cert-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 0.5rem;   /* matches committee .modal-content */
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(12px);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: visible; /* allow CSS tooltips on child elements to escape dialog bounds */
}

.cert-modal-backdrop--visible .cert-modal-dialog {
  transform: translateY(0);
}

/* PDD variant is wider to accommodate the 4-column FTE table */
.cert-modal-dialog-pdd {
  max-width: 620px;
}

/* ── Close button ─────────────────────────────────────────── */
/* Matches committee.css .btn-secondary / .btn-close:
   transparent bg, gold border, navy text, uppercase */
.cert-btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--acec-gold, #F7C95D);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--acec-dark, #213138);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  padding: 0;
  font-family: Raleway, sans-serif;
}

.cert-btn-close i {
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
}

.cert-btn-close:hover {
  background: var(--acec-gold, #F7C95D);
  color: var(--acec-dark, #213138);
}

/* ── Body ─────────────────────────────────────────────────── */
.cert-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

/* ── Header row (icon + title) ────────────────────────────── */
.cert-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding-right: 2.5rem; /* space for absolute-positioned close button */
}

.cert-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #faf5e6;
  border: 1px solid #f5ecd3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--acec-gold-dark, #e09a10);
}

.cert-icon-badge svg,
.cert-icon-badge i {
  width: 20px;
  height: 20px;
  font-size: 20px;
  color: var(--acec-gold-dark, #e09a10);
}

/* Title: Playfair Display, navy, bold — matches committee h1/h2/h3 */
.cert-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--acec-dark, #213138);
  margin: 0;
  line-height: 1.3;
}

/* ── Subtitle row (text left, info icon right) ────────────── */
.cert-subtitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.875rem;
}

.cert-subtitle-text {
  flex: 1 1 auto;
  font-family: var(--font-main);
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.cert-subtitle-highlight {
  color: #6b7280;
}

.cert-subtitle-highlight strong {
  color: #6b7280;
  font-weight: 700;
}

/* ── Info button (ⓘ right of subtitle text) ──────────────── */
.cert-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  background: transparent;
  color: var(--acec-gold-dark, #e09a10);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s, transform 0.15s;
}

.cert-info-btn:hover {
  color: var(--acec-dark, #213138);
  transform: scale(1.15);
}

.cert-info-btn i {
  width: 1.1rem;
  height: 1.1rem;
  font-size: 1.1rem;
}

.cert-info-btn svg{
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1.5rem;
}

/* ── Company bar ──────────────────────────────────────────── */
.cert-company-bar {
  background: #fff;
  padding: 0.625rem 0;
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-family: var(--font-main);
}

.cert-company-name {
  font-weight: 500;
  color: var(--acec-navy);
  font-family: var(--font-main);
}

/* State pill badge — outlined, right-aligned */
.cert-state-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--acec-gold);
  border-radius: 2rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--acec-gold-dark);
  background-color: #ffd57933;
  font-family: Raleway, sans-serif;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ── FTE description (bold) ───────────────────────────────── */
.cert-fte-desc {
  font-family: Raleway, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--acec-dark, #213138);
  margin: 0 0 0.875rem;
  line-height: 1.5;
}

/* ── Show More collapsible ────────────────────────────────── */
/* Gold border, cream bg — matches committee accordion feel */
.cert-show-more {
  border: 1px solid var(--acec-gold, #F7C95D);
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.875rem;
}

.cert-show-more-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: #faf5e6;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--acec-dark, #213138);
  text-align: left;
  transition: background 0.2s;
  font-family: Raleway, sans-serif;
  letter-spacing: 0.02em;
}

.cert-show-more-btn:hover {
  background: #f5ecd3;
}

.cert-chevron {
  margin-left: auto;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.cert-chevron svg,
.cert-chevron i {
  width: 14px;
  height: 14px;
  font-size: 14px;
}

.cert-chevron--open {
  transform: rotate(180deg);
}

.cert-show-more-content {
  padding: 0.875rem;
  font-size: 0.82rem;
  color: #4a575d;
  background: rgba(247, 201, 93, 0.07);
  border-top: 1px solid rgba(247, 201, 93, 0.3);
  font-family: Raleway, sans-serif;
  line-height: 1.55;
}

.cert-show-more-content p {
  margin: 0 0 0.625rem;
  color: #4a575d;
  font-family: Raleway, sans-serif;
}

.cert-show-more-content p:last-child {
  margin-bottom: 0;
}

.cert-show-more-content strong {
  color: var(--acec-dark, #213138);
  font-weight: 700;
}

.cert-show-more-content--hidden {
  display: none;
}

/* ── Instruction ──────────────────────────────────────────── */
.cert-instruction {
  font-family: Raleway, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #6b7280;
  margin: 1.5rem 0 0.5rem;
}

/* ── FTE entry cards ──────────────────────────────────────── */
.cert-fte-cards {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

/* Single FTE card — bordered, rounded */
.cert-fte-card {
  border: 1.5px solid var(--acec-border, #dee2e6);
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Optional row label above the card (hidden by default — context clear from instruction) */
.cert-fte-card-label {
  display: none;
}

/* Two-column inner layout */
.cert-fte-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Left: Previously Reported */
.cert-fte-card-prev {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-right: 1.5px solid var(--acec-border, #dee2e6);
}

/* Right: Current entry */
.cert-fte-card-curr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: #fff;
}

/* Small caption above the value / input */
.cert-fte-card-caption {
  font-family: Raleway, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.cert-fte-card-caption--curr {
  color: var(--acec-gold-dark, #e09a10);
  text-transform: none;
}

.cert-fte-card-caption--label {
  text-transform: none;
}

/* Large previously-reported number */
.cert-fte-card-prev-value {
  font-family: var(--font-main);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--acec-dark, #213138);
  line-height: 1;
}

/* Input: matches committee .form-control */
.cert-fte-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.875rem;
  font-family: var(--font-main);
  border: 1.5px solid #ced4da;
  border-radius: 0.5rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--acec-dark, #213138);
  background: #fff;
}

.cert-fte-input::placeholder {
  color: #adb5bd;
}

.cert-fte-input:focus {
  border-color: var(--acec-gold, #F7C95D);
  box-shadow: 0 0 0 0.2rem rgba(247, 201, 93, 0.25);
}

.cert-fte-input--error {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* ── Footer ───────────────────────────────────────────────── */
/* Matches committee .modal-footer */
.cert-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--acec-border, #dee2e6);
  flex-shrink: 0;
}

/* REMIND ME LATER — transparent bg, gold border, navy text, uppercase
   Matches committee .btn-secondary / .view-committee-btn */
.cert-btn-outline {
  background-color: transparent;
  border: 1.5px solid var(--acec-gold, #F7C95D);
  color: var(--acec-dark, #213138);
  font-family: Raleway, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cert-btn-outline:hover {
  background-color: var(--acec-gold, #F7C95D);
  color: var(--acec-dark, #213138);
}

.cert-btn-outline:active {
  background-color: var(--acec-gold-dark, #e09a10);
  border-color: var(--acec-gold-dark, #e09a10);
  color: var(--acec-dark, #213138);
}

/* SUBMIT — gold bg, navy text, uppercase
   Matches committee .join-committee-btn / .apply-committee-btn */
.cert-btn-submit {
  background-color: var(--acec-gold, #F7C95D);
  border: 1.5px solid var(--acec-gold, #F7C95D);
  color: var(--acec-dark, #213138);
  font-family: Raleway, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.cert-btn-submit:hover:not(:disabled) {
  background-color: var(--acec-gold, #F7C95D);
  border-color: var(--acec-gold, #F7C95D);
  color: var(--acec-dark, #213138);
  opacity: 0.85;
}

.cert-btn-submit:active:not(:disabled) {
  background-color: var(--acec-gold-dark, #e09a10);
  border-color: var(--acec-gold-dark, #e09a10);
  opacity: 1;
}

.cert-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Error banner ─────────────────────────────────────────── */
.cert-error-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.875rem;
  border-radius: 0.375rem;
  background-color: #fff5f5;
  border: 1px solid #f5c2c7;
  color: #842029;
  font-size: 0.825rem;
  font-family: Raleway, sans-serif;
  line-height: 1.4;
}

.cert-error-banner--hidden {
  display: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 575.98px) {
  .cert-modal-dialog,
  .cert-modal-dialog-pdd {
    max-width: 100%;
    border-radius: 0.5rem;
  }

  .cert-modal-body {
    padding: 1.25rem 1rem 0.75rem;
    overflow-x: hidden;
  }

  .cert-modal-footer {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.625rem;
  }

  .cert-btn-outline,
  .cert-btn-submit {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .cert-fte-card-prev,
  .cert-fte-card-curr {
    padding: 0.625rem 0.75rem;
  }

  .cert-fte-card-prev-value {
    font-size: 1.4rem;
  }
}

/* ============================================================
   FTE Calculation & Policy Details (Info Modal)
   ============================================================ */

/* Stacks on top of the main modal backdrop */
.cert-info-modal-backdrop {
  z-index: 10000;
}

.cert-info-modal-dialog {
  max-width: 500px;
}

/* ── Info modal title ─────────────────────────────────────── */
.cert-info-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--acec-dark, #213138);
  margin: 0 0 1rem;
  padding-right: 2.5rem; /* space for close button */
  line-height: 1.3;
}

/* ── Numbered cards row ───────────────────────────────────── */
.cert-info-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cert-info-card {
  background: #faf5e6;
  border: 1px solid #f0e5c8;
  border-radius: 0.5rem;
  padding: 0.875rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}

.cert-info-card-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--acec-gold-dark, #e09a10);
  color: #fff;
  font-family: Raleway, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-info-card-text {
  font-family: Raleway, sans-serif;
  font-size: 0.82rem;
  color: var(--acec-dark, #213138);
  margin: 0;
  line-height: 1.5;
}

.cert-info-card-text strong {
  color: var(--acec-dark, #213138);
  font-weight: 700;
}

/* ── Note ─────────────────────────────────────────────────── */
.cert-info-note {
  font-family: Raleway, sans-serif;
  font-size: 0.875rem;
  color: var(--acec-navy, #213138);
  margin: 0 0 0.875rem;
  line-height: 1.5;
}

.cert-info-note strong {
  color: var(--acec-navy, #213138);
  font-weight: 700;
}

/* ── Divider ──────────────────────────────────────────────── */
.cert-info-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0 0 0.875rem;
}

/* ── Bylaws content ───────────────────────────────────────── */
.cert-info-bylaws {
  font-family: Raleway, sans-serif;
  font-size: 0.82rem;
  color: #4a575d;
  line-height: 1.55;
  border: 1px solid var(--acec-gold);
  border-radius: 0.5rem;
  padding: 0.875rem;
}

.cert-info-bylaws p {
  margin: 0 0 0.625rem;
  color: #4a575d;
  font-family: Raleway, sans-serif;
}

.cert-info-bylaws p:last-child {
  margin-bottom: 0;
}

.cert-info-bylaws strong {
  color: var(--acec-dark, #213138);
  font-weight: 700;
}

/* ── Info modal footer (CLOSE right-aligned) ──────────────── */
.cert-info-modal-footer {
  justify-content: flex-end;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 575.98px) {
  .cert-info-cards {
    grid-template-columns: 1fr;
  }

  .cert-info-modal-footer {
    justify-content: stretch;
  }

  .cert-info-modal-footer .cert-btn-outline {
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   "New Certification Required" Notification Modal
   Compact variant — shown when certificationLink is a plain URL
   ============================================================ */

.cert-notification-dialog {
  max-width: 460px;
}

/* Center-aligned body layout */
.cert-notification-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 2rem 1.25rem;
}

/* Larger icon badge for the notification variant */
.cert-notification-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
}

.cert-notification-icon svg,
.cert-notification-icon i {
  width: 26px;
  height: 26px;
  font-size: 26px;
}

.cert-notification-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.cert-notification-subtitle {
  font-size: 0.875rem;
  color: var(--acec-navy, #213138);
  margin: 0;
  text-align: center;
  font-family: var(--font-main);
}

/* Notification footer — right-aligned with gap so buttons sit neatly */
.cert-notification-footer {
  justify-content: flex-end;
  gap: 0.75rem;
}

/* "GO TO CERTIFICATION →" button — styled as an <a> matching cert-btn-submit */
.cert-btn-go {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--acec-dark, #213138);
}

.cert-btn-go:hover:not(:disabled) {
  color: var(--acec-dark, #213138);
  text-decoration: none;
  opacity: 0.85;
}

.cert-btn-arrow {
  font-size: 1rem;
  line-height: 1;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 575.98px) {
  .cert-notification-dialog {
    max-width: 100%;
  }

  .cert-notification-footer {
    flex-direction: column;
    gap: 0.625rem;
  }

  .cert-notification-footer .cert-btn-outline,
  .cert-notification-footer .cert-btn-go {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ============================================================
   OVERRIDE CONFIRMATION MODAL
   ============================================================ */

/* Dialog size — compact, similar to notification modal */
.cert-override-dialog {
  max-width: 480px;
}

/* Body spacing */
.cert-override-body {
  padding: 1.75rem 1.75rem 1rem;
}

/* Title */
.cert-override-title {
  font-family: var(--font-title, 'Raleway', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--acec-navy, #213138);
  margin: 0 0 0.4rem;
}

/* "Certification for 27 has been submitted by:" */
.cert-override-subtitle {
  font-family: var(--font-main, 'Raleway', sans-serif);
  font-size: 0.875rem;
  color: var(--acec-gray, #6c757d);
  margin: 0 0 0.85rem;
}

/* Card containing submitter email + MO name */
.cert-override-submitter-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Submitter email — bold, navy */
.cert-override-user {
  font-family: var(--font-main, 'Raleway', sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--acec-navy, #213138);
  word-break: break-all;
}

/* Submission date — muted, smaller */
.cert-override-date {
  font-family: var(--font-main, 'Raleway', sans-serif);
  font-size: 0.775rem;
  color: var(--acec-gold-dark, #b8860b);
}

/* "Reported Values" section */
.cert-override-reported {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

/* Caption above the values */
.cert-override-reported-caption {
  display: block;
  font-family: var(--font-main, 'Raleway', sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--acec-gray, #6c757d);
  margin-bottom: 0.5rem;
}

/* Two-column row for firm/state FTE values */
.cert-override-values-row {
  display: flex;
  gap: 2rem;
}

.cert-override-value-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cert-override-value-label {
  font-family: var(--font-main, 'Raleway', sans-serif);
  font-size: 0.775rem;
  color: var(--acec-gray, #6c757d);
}

/* The big number */
.cert-override-value-num {
  font-family: var(--font-main, 'Raleway', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--acec-navy, #213138);
  line-height: 1.2;
}

/* "Do you wish to override what was reported?" */
.cert-override-question {
  font-family: var(--font-main, 'Raleway', sans-serif);
  font-size: 0.875rem;
  color: var(--acec-gold-dark, #b8860b);
  font-weight: 600;
  margin: 0 0 0.25rem;
}

/* Footer — right-aligned buttons */
.cert-override-footer {
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 575.98px) {
  .cert-override-dialog {
    max-width: 100%;
  }

  .cert-override-values-row {
    gap: 1.25rem;
  }
}

/* ============================================================
   PDD FTE TABLE  (mirrors CertificationDashboard PDC table)
   Only used inside the PDD variant of the CertificationModal.
   ============================================================ */

/* Wrapper — fills modal body width */
.cert-fte-table-wrap {
  margin-bottom: 0.75rem;
}

/* Table container — bordered, rounded, overflow visible so CSS tooltips escape */
.pdd-fte-table-container {
  border: 1px solid var(--acec-border, #dee2e6);
  border-radius: 0.375rem;
  overflow: visible;
}

/* Fixed header band */
.pdd-fte-table-header {
  background: var(--acec-light-gray, #f3f4f6);
  border-bottom: 1px solid var(--acec-border, #dee2e6);
}

.pdd-fte-table-header table {
  margin: 0;
}

/* Body — single data row, no scroll needed */
.pdd-fte-table-body {
  overflow: visible;
}

.pdd-fte-table-body table {
  margin: 0;
}

/* Shared table styles */
.pdd-fte-table {
  width: 100%;
  font-family: Raleway, sans-serif;
  font-size: 0.8rem;
  color: var(--acec-navy, #213138);
  border-collapse: collapse;
  table-layout: fixed;
}

.pdd-fte-table th {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--acec-navy, #213138);
  padding: 0.55rem 0.75rem;
  text-align: left;
  white-space: nowrap;
  background: var(--acec-light-gray, #f3f4f6);
}
th.pdd-th-fte {
  text-align: center;
}

.pdd-th-center {
  text-align: center;
}

.pdd-fte-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--acec-border, #dee2e6);
  vertical-align: middle;
}

.pdd-fte-table tbody tr:last-child td {
  border-bottom: none;
}

/* HQ row — subtle background */
.pdd-row-hq {
  background: transparent;
}

/* Firm name cell */
.pdd-firm-name-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  color: var(--acec-navy, #213138);
}

/* HQ badge — building icon in a gold circle */
.pdd-hq-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--acec-gold, #F7C95D);
  background: rgba(247, 201, 93, 0.12);
  font-size: 0.6rem;
  color: var(--acec-navy, #213138);
  cursor: help;
  flex-shrink: 0;
}

/* FTE cell: prev pill + input, centred */
.pdd-fte-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
  font-family: var(--font-main);
}

/* Previously-reported pill */
.pdd-fte-prev-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  background: var(--acec-light-gray, #f3f4f6);
  border: 1px dashed var(--acec-muted, #9ca3af);
  font-size: 0.75rem;
  color: var(--acec-navy);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: help;
}

.pdd-fte-prev-pill i {
  font-size: 0.65rem;
  color: var(--acec-muted, #9ca3af);
}

/* FTE number input inside the PDD table */
.pdd-fte-input {
  width: 72px;
  text-align: center;
  padding: 0.25rem 0.4rem;
  border: 1.5px solid var(--acec-border, #dee2e6);
  border-radius: 0.25rem;
  font-family: var(--font-main);
  font-size: 0.8rem;
  color: var(--acec-navy, #213138);
  background: #fff;
  outline: none;
  display: block;
  margin: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pdd-fte-input:focus {
  border-color: var(--acec-gold, #F7C95D);
  box-shadow: 0 0 0 0.15rem rgba(247, 201, 93, 0.25);
}

/* Error state — reuses cert-fte-input--error which is already defined */

/* Responsive — stack pill above input on very small screens */
@media (max-width: 575.98px) {
  .pdd-fte-table th,
  .pdd-fte-table td {
    padding: 0.45rem 0.5rem;
    font-size: 0.72rem;
  }

  .pdd-fte-cell {
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
  }

  .pdd-fte-input {
    width: 60px;
  }
}

/* Shorten FTE column headers to "Total" / "State" on very narrow screens */
@media (max-width: 414px) {
  .pdd-fte-table th.pdd-th-fte {
    font-size: 0;        /* hide the full text without affecting layout */
    white-space: nowrap;
    padding-left: 1rem;
  }

  .pdd-fte-table th.pdd-th-fte::before {
    content: attr(data-short);
    font-size: 0.72rem;  /* restore readable size for the short label */
    font-weight: 600;
  }
}

/* ============================================================
   PURE CSS TOOLTIPS  — used on PDD modal elements
   (.pdd-hq-badge and .pdd-fte-prev-pill via [data-tooltip])
   Avoids Bootstrap JS Tooltip z-index / overflow-hidden issues.
   ============================================================ */

[data-tooltip] {
  position: relative;
}

/* Tooltip bubble */
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(33, 49, 56, 0.92);
  color: #fff;
  font-family: Raleway, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0.3rem 0.6rem;
  border-radius: 0.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Arrow */
[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(33, 49, 56, 0.92);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10200;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus::before {
  opacity: 1;
}