/**
 * Alliance 공통 스타일 (sites/default/pages/alli 영역 공통 활용)
 * 사용: 해당 요소에 class="alli alli-section" 형태로 적용
 *
 * [섹션·카드]
 * - .alli.alli-section: 섹션(카드) 테두리
 *
 * [태그]
 * - .alli.alli-tags, .alli.alli-tag, .alli.alli-tag-icon: 태그
 *
 * [메타]
 * - .alli.alli-meta, .alli.alli-meta-item, .alli.alli-meta-icon: 댓글 수·조회수·작성일
 *
 * [작성자]
 * - .alli.alli-author, .alli.alli-author-initial, .alli.alli-author-name, .alli.alli-author-org: 작성자(원형 첫글자·이름·회사)
 *
 * [공통 유틸]
 * - .alli.alli-btn-outline: 보조 버튼(목록으로, 취소 등)
 * - .alli.alli-btn-register: 등록하기 버튼(새 Space 만들기, 새 마일스톤 등록, 새 글 등록하기)
 * - .alli.alli-badge: 역할/상태 pill 뱃지(기본 회색)
 * - .alli.alli-empty-wrap: 빈 상태 컨테이너(아이콘+문구 세로 배치)
 * - .alli.alli-empty-icon: 빈 상태 동그라미 느낌표 아이콘
 * - .alli.alli-empty: 빈 목록·빈 상태 메시지 문구
 * - .alli.alli-divider: 구분선(border-top)
 * - .alli.alli-heading: 페이지 제목/브레드크럼 텍스트(1.25rem, 굵게, #111827)
 */

/* 페이지 제목/브레드크럼 */
.alli.alli-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
}

/* 섹션(카드) 테두리 */
.alli.alli-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* 태그 영역 */
.alli.alli-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.alli.alli-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 12px;
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* 태그 좌측 아이콘 (CSS data URI SVG) - currentColor 적용, mask 미지원 브라우저는 아이콘 비표시 */
@supports (mask-image: url("data:image/svg+xml,%3Csvg/%3E")) or (-webkit-mask-image: url("data:image/svg+xml,%3Csvg/%3E")) {
  .alli.alli-tag::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
  }
}

.alli.alli-tag-icon {
  width: 14px;
  height: 14px;
  color: #64748b;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alli.alli-tag-icon svg {
  width: 100%;
  height: 100%;
}

/* 메타 (댓글 수, 조회수, 작성일) */
.alli.alli-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
}

.alli.alli-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.alli.alli-meta-icon {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alli.alli-meta-icon svg {
  width: 100%;
  height: 100%;
}

/* 작성자 영역 (원형 첫글자, 작성자 이름, 회사/소속) - 부모 너비에 따라 반응형 */
.alli.alli-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  min-width: 0;
  flex-wrap: wrap;
}

.alli.alli-author-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.alli.alli-author-initial.alli-author-initial--has-overlay,
.alli.alli-author-initial.alli-author-initial--access-suspended,
.alli.alli-author-initial.alli-author-initial--owner-badge,
.alli.alli-author-initial.alli-author-initial--has-avatar {
  position: relative;
}

.alli.alli-author-initial.alli-author-initial--has-avatar {
  overflow: hidden;
}

.alli.alli-author-initial .alli-author-initial-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.alli.alli-author-initial .alli-author-initial-owner {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 0;
  box-sizing: border-box;
  z-index: 1;
  filter: drop-shadow(0 0 1px rgba(212, 160, 60, 0.45));
}

.alli.alli-author-initial .alli-author-initial-owner--paired {
  right: 17px;
}

.alli.alli-author-initial .alli-author-initial-owner svg {
  width: 20px;
  height: 20px;
  display: block;
}

.alli.alli-author-initial .alli-author-initial-access-suspended {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 0;
  box-sizing: border-box;
  z-index: 2;
  filter: drop-shadow(0 0 1px rgba(185, 28, 28, 0.35));
}

.alli.alli-author-initial .alli-author-initial-access-suspended svg {
  width: 20px;
  height: 20px;
  display: block;
}

.alli.alli-author-initial .alli-author-initial-overlay {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fef9c3;
  color: #ca8a04;
  border: 1px solid #fde68a;
  line-height: 0;
  box-sizing: border-box;
}

.alli.alli-author-initial .alli-author-initial-overlay svg {
  width: 9px;
  height: 9px;
}

.alli.alli-author-name {
  font-weight: 500;
  color: #334155;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alli.alli-author-user-id {
  flex-shrink: 0;
  font-weight: 400;
  color: #64748b;
  white-space: nowrap;
}

.alli.alli-author-org {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  font-size: 13px;
  color: #64748b;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alli.alli-author-email {
  font-size: 13px;
  color: #64748b;
}

/* ========== 공통 유틸 (전환·상태·목록 등 여러 화면에서 재사용) ========== */

/* 보조 버튼 (목록으로, 취소 등) */
.alli.alli-btn-outline {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.alli.alli-btn-outline:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #64748b;
  color: #334155;
}
.alli.alli-btn-outline:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* 등록하기 버튼 (새 Space 만들기, 새 마일스톤 등록, 새 글 등록하기) */
.alli.alli-btn-register {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--theme-color-secondary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.alli.alli-btn-register:hover:not(:disabled) {
  background: #4338ca;
}
.alli.alli-btn-register:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* 역할/상태 pill 뱃지 (기본 회색, 페이지별 색상은 해당 스타일에서 오버라이드) */
.alli.alli-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* 빈 목록·빈 상태 메시지 영역 */
.alli.alli-empty-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  flex: 1;
  min-height: 0;
}
.alli.alli-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid #a0a0a0;
  background: transparent;
  color: #a0a0a0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.alli.alli-empty {
  text-align: center;
  padding: 48px 20px;
  font-size: 14px;
  color: #94a3b8;
}
.alli.alli-empty-wrap .alli.alli-empty {
  padding: 0;
}

/* 구분선 */
.alli.alli-divider {
  border-top: 1px solid #e5e7eb;
  margin: 20px 0 20px 0;
}
