/**
 * ops-header.css — OPS 공통 헤더 스타일
 * 2026.04.19 Trinity
 */

/* 공통 헤더 로드된 페이지에서 각 페이지의 "브랜드 로고+상단바"만 숨김 (중복 방지)
 * ⚠️ admin-*/my-profile 등 단순 타이틀+버튼 헤더(.header)는 **숨기면 안 됨** (내부 액션 버튼 포함).
 * 숨김 기준: 자체 헤더에 BF 로고(.header-brand 또는 .logo-svg)가 있는 경우만 = index, booking 등.
 */
body:has(#ops-header) .header:has(.header-brand),
body:has(#ops-header) .header:has(.logo-svg),
body:has(#ops-header) .top-bar:has(.header-brand),
body:has(#ops-header) .top-bar:has(.logo-svg),
/* 허브 자체 상단 */
body:has(#ops-header) .hub-header,
/* 스케줄·부킹·프로덕션의 자체 설정 드롭다운 (PW변경+로그아웃 묶음) */
body:has(#ops-header) .settings-dropdown,
/* production.html 하단 로그아웃 링크 */
body:has(#ops-header) a[href="#"][onclick*="logout"],
/* 공통 로그아웃 클래스 */
body:has(#ops-header) .btn-logout {
  display: none !important;
}
.opshdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: #FFFFFF;
  border-bottom: 1px solid #EFEEEA;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  font-size: 14px;
  color: #2C2B28;
  position: sticky;
  top: 0;
  z-index: 50;
}
.opshdr-left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.opshdr-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #111110;
  font-weight: 700;
  letter-spacing: 1px;
}
.opshdr-logo-svg {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.opshdr-logo-text {
  font-size: 14px;
}

/* 브레드크럼 네비게이션 */
.opshdr-crumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #5E5C57;
}
.opshdr-crumb-link {
  color: #5E5C57;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.opshdr-crumb-link:hover {
  background: #F0EEE8;
  color: #111110;
}
.opshdr-crumb-sep {
  color: #B8B5AE;
  font-size: 11px;
}
.opshdr-crumb-section {
  color: #8B8983;
}
.opshdr-crumb-current {
  color: #111110;
  font-weight: 600;
}

/* 계정 이름 긴 경우 말줄임 */
.opshdr-account-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opshdr-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* AI Trinity 슬롯 (계정 버튼 왼쪽) */
.opshdr-ai-slot {
  display: inline-flex;
  align-items: center;
}
/* 옵션 B — 말풍선 (좌하단 꼬리) */
.opshdr-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 14px;              /* 둥근 캡슐 */
  background: #111110;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.2px;
  position: relative;                /* 꼬리 앵커 */
  transition: transform 0.15s, background 0.15s;
}
.opshdr-ai-btn:hover {
  background: #2a2a28;
  transform: translateY(-2px);       /* 살짝 떠오름 */
}
.opshdr-ai-btn:active {
  transform: translateY(0);
}
/* 말풍선 꼬리 (좌하단) */
.opshdr-ai-btn::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 16px;
  width: 10px;
  height: 10px;
  background: inherit;              /* 버튼 배경과 동일 */
  transform: rotate(45deg);
  border-bottom-right-radius: 2px;
}
/* 신호등 dot (admin 위젯만 이 클래스 씀 — staff는 뱃지 없음) */
.opshdr-ai-btn .tcw-fab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #8B8983;
}

/* 드롭다운 공통 */
.opshdr-lang, .opshdr-account {
  position: relative;
}
.opshdr-lang-btn, .opshdr-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: #2C2B28;
}
.opshdr-lang-btn:hover, .opshdr-account-btn:hover {
  background: #F7F6F3;
  border-color: #E6E4DD;
}
.opshdr-chevron {
  font-size: 10px;
  color: #8B8983;
}

.opshdr-lang-menu, .opshdr-account-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E6E4DD;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  min-width: 160px;
  padding: 4px;
  display: none;
  flex-direction: column;
  z-index: 60;
}
.opshdr-lang-menu.open, .opshdr-account-menu.open {
  display: flex;
}
.opshdr-lang-menu button, .opshdr-account-menu button, .opshdr-account-menu a {
  display: block;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: #2C2B28;
  text-align: left;
  text-decoration: none;
  border-radius: 4px;
}
.opshdr-lang-menu button:hover, .opshdr-account-menu button:hover, .opshdr-account-menu a:hover {
  background: #F7F6F3;
}

.opshdr-account-btn {
  gap: 8px;
}
.opshdr-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #111110;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.opshdr-account-name {
  font-weight: 500;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opshdr-account-info {
  padding: 10px 12px;
  border-bottom: 1px solid #EFEEEA;
  margin-bottom: 4px;
}
.opshdr-account-info-name {
  font-weight: 600;
  font-size: 13px;
  color: #111110;
}
.opshdr-account-info-code {
  font-size: 11px;
  color: #8B8983;
  margin-top: 2px;
  font-family: 'SF Mono', Consolas, monospace;
}

@media (max-width: 640px) {
  .opshdr { padding: 8px 14px; }
  .opshdr-left { gap: 10px; }
  .opshdr-account-name { max-width: 80px; }
}
