/*
 * ESG-07 기업 소개 팝업(/esg/companies/:id) — P5-S7-T1
 * application.css 의 .content-popup(WEB-03) 과 같은 결이지만, 여러 태스크가 함께 고치는
 * application.css 는 건드리지 않고 화면별 파일로 따로 둡니다(esg_checkout.css 와 같은 규칙).
 * 색은 전부 var(--…) 로만 쓰고 새 hex 값은 여기 적지 않습니다.
 */

.esg-company-popup {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.esg-company-popup__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--color-text) 70%, transparent);
}

.esg-company-popup__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
  background: var(--color-background);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-lg);
}

.esg-company-popup__topbar {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-2) var(--space-4) 0;
}

.esg-company-popup__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  border-radius: var(--radius-card);
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.5rem;
}

.esg-company-popup__close:hover {
  background: var(--color-surface);
}

/* ── 기업 머리(로고 · 이름 · 메시지 · 배지 · 티어 · 웹사이트) ────────── */
.esg-company-popup__header {
  display: flex;
  gap: var(--space-4);
  padding: 0 var(--space-6) var(--space-4);
}

.esg-company-popup__logo {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: var(--radius-card);
  object-fit: contain;
}

.esg-company-popup__logo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-bold);
}

.esg-company-popup__identity {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.esg-company-popup__name {
  font-size: var(--font-size-title-lg);
  font-weight: var(--font-weight-bold);
}

.esg-company-popup__name-en {
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}

.esg-company-popup__message {
  color: var(--color-text-muted);
}

.esg-company-popup__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.esg-company-popup__badge {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-2);
  min-height: 24px;
  border-radius: var(--radius-card);
  background: var(--color-indigo-50);
  color: var(--color-primary-pressed);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
}

.esg-company-popup__tier {
  color: var(--color-text-muted);
  font-size: var(--font-size-caption);
}

.esg-company-popup__website {
  color: var(--color-primary-pressed);
  font-weight: var(--font-weight-medium);
}

/* ── 지원 작품 포스터 목록 ────────────────────────────────── */
.esg-company-popup__works {
  padding: 0 var(--space-6) var(--space-6);
}

.esg-company-popup__work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-3);
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
}

.esg-company-popup__poster-link {
  display: block;
}

.esg-company-popup__poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-card);
  object-fit: cover;
  background: var(--color-surface);
}

.esg-company-popup__works-empty {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
}
