/**
 * Open PhD Positions single post (category 132) — template-specific styles.
 * Colour-blind friendly: emphasis via contrast, border, and spacing—not hue alone.
 */

/* Match production React single layout — neutral outer chrome */
body.single-open-position-post .main-content.single-open-position-page {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}

/* Overview: keep section chrome light, but give H2 + panel breathing room from page edge */
.single-open-position-page #php-custom-fields-container .content-block.op-overview-section {
  padding: 0.25rem 0.75rem 0.5rem !important;
  margin: 1.5rem 0 !important;
  border-left: none !important;
}

.single-open-position-page .summary-info-table {
  width: 100%;
  margin-top: 0.5rem;
}

.single-open-position-page .op-host-offer-table {
  margin: 0.75rem 0 1.5rem;
}

.single-open-position-page .op-open-position-description-block h3,
.single-open-position-page .op-open-position-description-block h4 {
  margin: 1.25rem 0 0.5rem;
}

.single-institute-catalog-page #php-custom-fields-container .content-block.op-overview-section {
  padding: 0.35rem 1rem 0.65rem !important;
  margin: 1.5rem 0 !important;
  border-left: none !important;
}

.single-institute-catalog-page .op-overview-section > h2 {
  margin: 0 0 0.85rem;
  padding: 0 0.15rem;
}

.single-institute-catalog-page .op-overview-panel__header {
  padding: 1.35rem 1.5rem 1.1rem;
}

.single-institute-catalog-page .op-overview-panel__actions {
  padding: 1.1rem 1.5rem 1.4rem;
}

.single-institute-catalog-page .op-overview-panel__row {
  padding: 0.9rem 1.5rem;
}

.single-open-position {
  max-width: 900px;
  margin: 0 auto;
}

.single-open-position-page .post-dates-bar {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.single-open-position-page .post-dates-bar + #php-custom-fields-container {
  margin-top: 0 !important;
}

/* Acronym badge (+30% vs previous 11px base ≈ 14px) */
.op-open-position-intro__logo {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(11px * 1.3);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  text-align: center;
  background: #fff;
  color: #1e293b;
}

/* Avoid grey page tint behind overview; panel stays white */
.single-open-position-page #php-custom-fields-container .content-block.op-overview-section,
#php-custom-fields-container .op-overview-section.content-block {
  background: transparent;
}

.op-overview-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.op-overview-panel__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 1.25rem 1.25rem 1rem;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}

.op-open-position-intro__text {
  flex: 1;
  min-width: 0;
}

.op-open-position-intro__university {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.op-open-position-intro__location {
  margin-top: 6px;
  color: #475569;
  font-size: 0.95rem;
}

.op-open-position-intro__status {
  margin-top: 10px;
}

.op-open-position-intro__funding {
  margin: 10px 0 0;
  font-weight: 600;
  color: #334155;
  font-size: 0.95rem;
}

.op-status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

/* Interactive rows: hover/focus tint + left bar (works for colour vision deficiencies) */
.op-overview-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.op-overview-panel__row {
  display: grid;
  grid-template-columns: 2rem minmax(120px, 200px) 1fr;
  gap: 0.5rem 0.75rem;
  align-items: start;
  margin: 0;
  padding: 0.85rem 1.25rem;
  background: #fff;
  border-left: 3px solid transparent;
  transition:
    background-color 0.2s ease,
    border-left-color 0.2s ease,
    box-shadow 0.2s ease;
}

@media (max-width: 600px) {
  .op-overview-panel__row {
    grid-template-columns: 2rem 1fr;
    grid-template-rows: auto auto;
  }

  .op-overview-panel__row .op-overview-panel__label {
    grid-column: 2;
  }

  .op-overview-panel__row .op-overview-panel__value {
    grid-column: 1 / -1;
    padding-left: 2.5rem;
  }
}

.op-overview-panel__row:hover,
.op-overview-panel__row:focus-within {
  background: #f8fafc;
  border-left-color: var(--mphd-cyan-700, #0e7490);
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.14);
}

.op-overview-panel__row:focus-visible {
  outline: 2px solid var(--mphd-cyan-700, #0e7490);
  outline-offset: -2px;
}

.op-overview-panel__icon {
  font-size: 1.05rem;
  line-height: 1.4;
  text-align: center;
  user-select: none;
}

.op-overview-panel__label {
  font-weight: 600;
  color: #475569;
  font-size: 0.92rem;
}

.op-overview-panel__value {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

.op-overview-panel__value a {
  color: var(--mphd-cyan-700, #0e7490);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.op-overview-panel__value a:hover {
  color: var(--mphd-navy-800, #0f4668);
}

.op-overview-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
  border-top: 1px solid #f1f5f9;
}

.op-overview-panel__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.op-overview-panel__btn--primary {
  background: var(--mphd-ocean-gradient-btn, linear-gradient(135deg, #0a3352 0%, #0e7490 55%, #0891b2 100%));
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 14px rgba(10, 51, 82, 0.22);
}

.op-overview-panel__btn--primary:hover {
  background: var(--mphd-ocean-gradient-btn-hover, linear-gradient(135deg, #061a2c 0%, #0a3352 45%, #0e7490 100%));
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(6, 26, 44, 0.28);
}

.op-overview-panel__btn--secondary {
  background: #fff;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
}

.op-overview-panel__btn--secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a !important;
}

/* Description + map */
#open-position-description .main-content {
  padding-top: 0.25rem;
}

#open-position-location .map-container iframe {
  max-width: 100%;
  width: 100%;
}

.op-open-position-description-block.content-block,
#open-position-location.content-block {
  background: #fff;
}
