/**
 * 파일명: helpdesk-common.css
 * 경로: helpdesk/assets/css/helpdesk-common.css
 * 설명: 헬프데스크 공통 스타일 — Solapi Design System v3.0
 * 디자인: HC Joyn Solapi (Pretendard + Indigo #4541FF)
 * 필수: Remix Icon CDN, Pretendard
 */

/* ========================================
   Solapi Design Tokens
   ======================================== */
.helpdesk-wrapper,
.helpdesk-theme-light.helpdesk-wrapper {
    --hc-accent:           #4541FF;
    --hc-accent-hover:     #3730E3;
    --hc-accent-light:     #A788FF;
    --hc-accent-glow:      rgba(69,65,255,.13);
    --hc-border-accent:    rgba(69,65,255,.35);
    --hc-accent-on-brand:  #ffffff;
    --hc-accent-gradient:  linear-gradient(135deg, #4541FF 0%, #A788FF 100%);

    --hc-bg-primary:       #F6F7FD;
    --hc-bg-secondary:     #ffffff;
    --hc-bg-tertiary:      #F4F5FB;
    --hc-bg-card:          #ffffff;
    --hc-bg-input:         #F4F5FB;

    --hc-text-primary:     #1A1A2E;
    --hc-text-secondary:   #555577;
    --hc-text-tertiary:    #9999BB;

    --hc-border:           #E2E4F0;
    --hc-glass-bg:         rgba(255,255,255,.90);
    --hc-glass-bg-light:   #FAFAFF;
    --hc-glass-border:     #E2E4F0;
    --hc-glass-blur:       14px;

    --hc-success:          #10B981;
    --hc-success-light:    rgba(16,185,129,.10);
    --hc-success-border:   rgba(16,185,129,.40);
    --hc-warning:          #F59E0B;
    --hc-warning-light:    rgba(245,158,11,.10);
    --hc-warning-border:   rgba(245,158,11,.40);
    --hc-error:            #EF4444;
    --hc-error-light:      rgba(239,68,68,.10);
    --hc-error-border:     rgba(239,68,68,.40);
    --hc-info:             #3B82F6;
    --hc-info-light:       rgba(59,130,246,.10);

    --hc-shadow-xs:        0 1px 4px rgba(30,30,80,.05);
    --hc-shadow-sm:        0 2px 10px rgba(30,30,80,.07);
    --hc-shadow-md:        0 4px 20px rgba(30,30,80,.10);
    --hc-shadow-lg:        0 10px 40px rgba(30,30,80,.14);
    --hc-shadow-accent:    0 4px 18px rgba(69,65,255,.26);

    --hc-space-xs:  4px;   --hc-space-sm: 8px;
    --hc-space-md:  16px;  --hc-space-lg: 24px;
    --hc-space-xl:  32px;  --hc-space-2xl: 48px;

    --hc-radius-sm:   6px;  --hc-radius-md:   10px;
    --hc-radius-lg:   14px; --hc-radius-xl:   18px;
    --hc-radius-full: 9999px;

    --hc-font-family:        'Pretendard',-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo',sans-serif;
    --hc-font-size-xs:       12px; --hc-font-size-sm:   14px;
    --hc-font-size-base:     15px; --hc-font-size-lg:   18px;
    --hc-font-size-xl:       20px; --hc-font-size-2xl:  24px;
    --hc-font-weight-medium: 500;  --hc-font-weight-bold: 700;

    --hc-transition-fast:   150ms cubic-bezier(.4,0,.2,1);
    --hc-transition-normal: 220ms cubic-bezier(.4,0,.2,1);
}

/* ======================================== 테마 격리 ======================================== */
/* joyn-resources와 동일: 좌우 패딩은 데스크톱만, 모바일은 0 (아래 반응형에서 데스크톱 40px 적용) */
body .helpdesk-page-backdrop {
    background-color: var(--hc-bg-primary) !important;
    width: 100%; min-height: 100vh;
    padding: 0 0 64px; box-sizing: border-box;
}
body .helpdesk-wrapper { background-color: transparent !important; color: var(--hc-text-primary) !important; font-family: var(--hc-font-family) !important; }
body .helpdesk-wrapper * { box-sizing: border-box !important; }
body .helpdesk-wrapper a { color: var(--hc-text-primary) !important; text-decoration: none; }
body .helpdesk-wrapper a:hover { color: var(--hc-accent) !important; }
body .helpdesk-wrapper input, body .helpdesk-wrapper select, body .helpdesk-wrapper textarea { background-color: var(--hc-bg-input) !important; color: var(--hc-text-primary) !important; border-color: var(--hc-border) !important; }
body .helpdesk-wrapper input::placeholder, body .helpdesk-wrapper textarea::placeholder { color: var(--hc-text-tertiary) !important; }
body .helpdesk-wrapper h1, body .helpdesk-wrapper h2, body .helpdesk-wrapper h3, body .helpdesk-wrapper h4, body .helpdesk-wrapper p, body .helpdesk-wrapper span, body .helpdesk-wrapper label, body .helpdesk-wrapper th, body .helpdesk-wrapper td { color: inherit !important; }
body .helpdesk-wrapper .helpdesk-board-title i { color: var(--hc-accent) !important; }
body .helpdesk-wrapper .helpdesk-tab.active { color: #ffffff !important; }
body .helpdesk-wrapper .helpdesk-search-btn i { color: #ffffff !important; }
/* 공지 분류 필은 span → 위쪽 span { color: inherit !important }가 활성 필 흰색을 덮어씀 */
body .helpdesk-wrapper span.helpdesk-board-cat-nav__item { color: var(--hc-text-primary) !important; }
body .helpdesk-wrapper span.helpdesk-board-cat-nav__item.is-active { color: #ffffff !important; }
body .helpdesk-wrapper span.helpdesk-board-cat-nav__item:hover:not(.is-active) { color: var(--hc-accent) !important; }

/* ======================================== 게시판 배경 ======================================== */
.helpdesk-page-backdrop {
    background-color: var(--hc-bg-primary);
    width: 100%; min-height: 100vh;
    padding: 0 0 64px; box-sizing: border-box;
}
body:has(.helpdesk-page-backdrop) { background-color: var(--hc-bg-primary) !important; }

/* 데스크톱만 좌우 40px (joyn-resources는 모바일 좌우 0) */
@media (min-width: 769px) {
    body .helpdesk-page-backdrop,
    .helpdesk-page-backdrop { padding-left: 40px; padding-right: 40px; }
}

/* ======================================== 기본 설정 ======================================== */
.helpdesk-wrapper {
    font-family: var(--hc-font-family);
    max-width: 1120px; margin: 0 auto;
    padding: 40px 0 0; box-sizing: border-box;
    background: transparent; color: var(--hc-text-primary);
    -webkit-font-smoothing: antialiased;
}
.helpdesk-wrapper * { box-sizing: border-box; }
.helpdesk-wrapper .glass-card {
    background: var(--hc-bg-secondary); border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-xl); box-shadow: var(--hc-shadow-sm);
}

/* ======================================== 탭 네비게이션 ======================================== */
.helpdesk-tabs {
    display: flex;
    background: var(--hc-bg-secondary); border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-xl); padding: 5px;
    margin-bottom: var(--hc-space-lg); gap: 4px;
    box-shadow: var(--hc-shadow-sm);
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    animation: helpdesk-fadeUp .4s cubic-bezier(.4,0,.2,1) both;
}
.helpdesk-tabs::-webkit-scrollbar { display: none; }

.helpdesk-tab {
    flex: 1 1 auto; min-width: clamp(70px,18vw,130px);
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: clamp(10px,2vw,14px) clamp(10px,1.5vw,18px);
    background: transparent; border: none; border-radius: var(--hc-radius-lg);
    cursor: pointer; font-family: var(--hc-font-family);
    font-size: clamp(13px,2.5vw,15px); font-weight: 600;
    color: var(--hc-text-tertiary); transition: all var(--hc-transition-fast);
    white-space: nowrap; letter-spacing: -.2px;
}
.helpdesk-tab:hover { background: var(--hc-bg-tertiary); color: var(--hc-text-secondary); }
.helpdesk-tab.active {
    background: var(--hc-accent-gradient) !important;
    color: #ffffff !important; border-color: transparent !important;
    box-shadow: var(--hc-shadow-accent);
}
.helpdesk-tab i { font-size: clamp(18px,4vw,22px); }
.helpdesk-tab.active i { color: #ffffff !important; }

/* ======================================== 게시판 컨테이너 ======================================== */
.helpdesk-board-container { position: relative; }
/* 모든 게시판(공지/정보/Q&A) 좌우 패딩 10px */
.helpdesk-board-container,
.helpdesk-notice-board,
.helpdesk-info-board,
.helpdesk-qa-board { padding-left: 10px; padding-right: 10px; box-sizing: border-box; }
.helpdesk-board-content { display: none; }
.helpdesk-board-content.active { display: block; animation: helpdesk-fadeUp .3s cubic-bezier(.4,0,.2,1); }

@keyframes helpdesk-fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes helpdesk-fadeUp  { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }

/* ======================================== 게시판 헤더 ======================================== */
.helpdesk-board-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--hc-space-md); flex-wrap: wrap; gap: var(--hc-space-md);
}
.helpdesk-board-title {
    font-size: 18px; font-weight: 800; color: var(--hc-text-primary);
    margin: 0; display: flex; align-items: center; gap: 8px; letter-spacing: -.4px;
}
.helpdesk-board-title i { font-size: 20px; color: var(--hc-accent); }

/* 제목 전용 / 검색 전용 헤더 줄 (공지·FAQ·Q&A·사용안내 공통) */
.helpdesk-board__title-line {
    justify-content: flex-start;
    margin-bottom: 0.65rem;
}
.helpdesk-board__search-line {
    justify-content: stretch;
    width: 100%;
    margin-bottom: var(--hc-space-md);
}
.helpdesk-board__search-line .helpdesk-search-box {
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
}

/* 분류·상태 필: 가로 스크롤 필 네비 (공지 전체 필 / FAQ / Q&A) */
.helpdesk-board-cat-nav-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 3.25rem;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    margin: 0 0 0.65rem;
    scrollbar-width: thin;
}
.helpdesk-board-cat-nav {
    display: block;
    min-width: min-content;
}
.helpdesk-board-cat-nav__track {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    padding: 2px 4px 6px;
    vertical-align: top;
}
.helpdesk-board-cat-nav__item {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--hc-border);
    border-radius: 999px;
    background: var(--hc-bg-tertiary);
    color: var(--hc-text-primary);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.helpdesk-board-cat-nav__item--static {
    cursor: default;
    pointer-events: none;
}
.helpdesk-board-cat-nav__item:hover {
    border-color: var(--hc-accent);
    color: var(--hc-accent);
}
.helpdesk-board-cat-nav__item.is-active {
    background: var(--hc-accent);
    border-color: var(--hc-accent);
    color: #fff;
}
.helpdesk-board-cat-nav__item:focus-visible {
    outline: 2px solid var(--hc-accent);
    outline-offset: 2px;
}
.helpdesk-board-cat-nav__track .helpdesk-category-btn,
.helpdesk-board-cat-nav__track .helpdesk-status-btn {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--hc-border);
    border-radius: 999px;
    background: var(--hc-bg-tertiary);
    color: var(--hc-text-primary);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    text-decoration: none;
}
.helpdesk-board-cat-nav__track .helpdesk-category-btn:hover,
.helpdesk-board-cat-nav__track .helpdesk-status-btn:hover {
    border-color: var(--hc-accent);
    color: var(--hc-accent);
}
.helpdesk-board-cat-nav__track .helpdesk-category-btn.active,
.helpdesk-board-cat-nav__track .helpdesk-status-btn.active {
    background: var(--hc-accent);
    border-color: var(--hc-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(69, 65, 255, 0.28);
}
.helpdesk-board-cat-nav__track .helpdesk-category-btn:focus-visible,
.helpdesk-board-cat-nav__track .helpdesk-status-btn:focus-visible {
    outline: 2px solid var(--hc-accent);
    outline-offset: 2px;
}

/* ======================================== 검색 박스 ======================================== */
.helpdesk-search-box { display: flex; gap: var(--hc-space-sm); align-items: center; }

.helpdesk-search-input {
    padding: 9px 16px; font-family: var(--hc-font-family); font-size: var(--hc-font-size-sm);
    border: 1.5px solid var(--hc-border); border-radius: var(--hc-radius-full);
    min-width: 220px; background: var(--hc-bg-input); color: var(--hc-text-primary);
    outline: none; transition: all var(--hc-transition-fast);
}
.helpdesk-search-input:focus {
    border-color: var(--hc-accent); box-shadow: 0 0 0 3px var(--hc-accent-glow);
    background: var(--hc-bg-secondary);
}
.helpdesk-search-input::placeholder { color: var(--hc-text-tertiary); }

.helpdesk-search-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; background: var(--hc-accent); border: none;
    border-radius: var(--hc-radius-full); color: #ffffff !important;
    cursor: pointer; transition: all var(--hc-transition-fast);
    flex-shrink: 0; box-shadow: var(--hc-shadow-accent);
}
.helpdesk-search-btn:hover { background: var(--hc-accent-hover); transform: translateY(-1px); }
.helpdesk-search-btn i { font-size: 16px; color: #ffffff !important; }

/* ======================================== 글쓰기 버튼 ======================================== */
.helpdesk-write-btn {
    position: relative;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; background: var(--hc-bg-secondary);
    border: 1.5px solid var(--hc-accent); border-radius: var(--hc-radius-full);
    color: var(--hc-accent) !important; font-family: var(--hc-font-family);
    font-size: 13px; font-weight: 700; cursor: pointer;
    transition: all var(--hc-transition-fast); white-space: nowrap;
}
.helpdesk-write-btn:hover { background: var(--hc-accent); color: #ffffff !important; box-shadow: var(--hc-shadow-accent); }
.helpdesk-write-btn i { font-size: 14px; color: inherit !important; }

/* ======================================== 테이블 ======================================== */
.helpdesk-board-table {
    background: var(--hc-bg-secondary); border-radius: var(--hc-radius-xl);
    overflow: hidden; border: 1px solid var(--hc-border);
    margin-bottom: var(--hc-space-md); box-shadow: var(--hc-shadow-sm);
}
.helpdesk-table { width: 100%; border-collapse: collapse; }
.helpdesk-table thead { background: var(--hc-bg-tertiary); border-bottom: 1px solid var(--hc-border); }
.helpdesk-table th {
    padding: 12px 16px; text-align: left; font-weight: 700;
    font-size: 11px; letter-spacing: .6px; text-transform: uppercase;
    color: var(--hc-text-tertiary); white-space: nowrap;
}
.helpdesk-table tbody tr { border-bottom: 1px solid var(--hc-border); transition: background var(--hc-transition-fast); cursor: pointer; }
.helpdesk-table tbody tr:last-child { border-bottom: none; }
.helpdesk-table tbody tr:hover { background: #FAFAFF; }
.helpdesk-table td { padding: 14px 16px; font-size: var(--hc-font-size-sm); color: var(--hc-text-secondary); vertical-align: middle; }
/* 기본 링크색 → 최종색 보간 금지(첫 로드·탭 전환 시 하늘색 플래시 방지). 호버에서만 color 트랜지션 */
.helpdesk-table a {
    color: var(--hc-text-primary, #1A1A2E) !important;
    font-weight: 600;
    font-size: var(--hc-font-size-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: none;
}
.helpdesk-table a:hover {
    color: var(--hc-accent) !important;
    transition: color var(--hc-transition-fast);
}
.col-num, .col-views { text-align: center; }
.col-num { font-size: 12px !important; font-weight: 600 !important; color: var(--hc-text-tertiary) !important; }
.col-views { font-size: 12px !important; color: var(--hc-text-tertiary) !important; }
.is-pinned { background: rgba(239,68,68,.03); }
.is-pinned td { font-weight: 700; }

/* ======================================== 뱃지 ======================================== */
.badge-new {
    display: inline-flex; align-items: center; padding: 2px 7px;
    background: var(--hc-accent-gradient); color: #ffffff;
    font-size: 9px; font-weight: 800; letter-spacing: .4px;
    border-radius: var(--hc-radius-full); margin-left: 6px; vertical-align: middle;
}
.badge-hot {
    display: inline-flex; align-items: center; padding: 2px 7px;
    background: var(--hc-warning-light); color: var(--hc-warning);
    font-size: 9px; font-weight: 800; border-radius: var(--hc-radius-full);
    margin-left: 6px; vertical-align: middle;
}
.badge-pinned {
    display: inline-flex; align-items: center; padding: 3px 9px;
    background: var(--hc-error-light); color: var(--hc-error);
    font-size: 10px; font-weight: 700; border-radius: var(--hc-radius-full);
}

/* ======================================== 페이지네이션 ======================================== */
.helpdesk-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 5px; margin: var(--hc-space-lg) 0;
}
.helpdesk-page-btn, .helpdesk-page-num {
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 8px;
    background: var(--hc-bg-secondary); border: 1.5px solid var(--hc-border);
    border-radius: var(--hc-radius-md); color: var(--hc-text-secondary);
    font-family: var(--hc-font-family); font-size: var(--hc-font-size-sm); font-weight: 600;
    text-decoration: none; cursor: pointer; transition: all var(--hc-transition-fast);
}
.helpdesk-page-btn:hover, .helpdesk-page-num:hover { border-color: var(--hc-accent); color: var(--hc-accent); }
.helpdesk-page-num.active { background: var(--hc-accent); border-color: var(--hc-accent); color: #ffffff; box-shadow: var(--hc-shadow-accent); }
.helpdesk-page-dots { padding: 0 4px; color: var(--hc-text-tertiary); }
.helpdesk-page-numbers { display: flex; gap: 5px; }

/* ======================================== 버튼 ======================================== */
.helpdesk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--hc-space-sm);
    padding: 9px 16px; font-family: var(--hc-font-family);
    font-size: var(--hc-font-size-sm); font-weight: 600;
    border: 1.5px solid var(--hc-border); border-radius: var(--hc-radius-md);
    background: var(--hc-bg-secondary); color: var(--hc-text-secondary) !important;
    cursor: pointer; transition: all var(--hc-transition-fast); min-height: 40px;
}
.helpdesk-btn:hover { border-color: var(--hc-accent); color: var(--hc-accent) !important; }
.helpdesk-btn-primary { background: var(--hc-accent-gradient); border-color: var(--hc-accent); color: #ffffff !important; box-shadow: var(--hc-shadow-accent); }
.helpdesk-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(69,65,255,.38); color: #ffffff !important; }
.helpdesk-btn-danger { background: var(--hc-error-light); border-color: var(--hc-error-border); color: var(--hc-error) !important; }
.helpdesk-btn-danger:hover { background: rgba(239,68,68,.20); border-color: var(--hc-error); }

/* ======================================== 모달 ======================================== */
.helpdesk-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 90px var(--hc-space-lg) var(--hc-space-lg);
    box-sizing: border-box;
    animation: helpdesk-fadeIn var(--hc-transition-fast);
}
.helpdesk-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(26,26,46,.52); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.helpdesk-modal-container {
    position: relative; background: var(--hc-bg-secondary);
    border: 1px solid var(--hc-border); border-radius: 20px;
    box-shadow: 0 28px 80px rgba(26,26,46,.22);
    max-width: 600px; width: 100%; max-height: 90vh;
    display: flex; flex-direction: column;
    animation: helpdesk-slideUp .22s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.helpdesk-modal-large .helpdesk-modal-container { max-width: 760px; }

@keyframes helpdesk-slideUp {
    from { transform: translateY(18px) scale(.97); opacity: 0; }
    to   { transform: translateY(0)     scale(1);  opacity: 1; }
}

/* 모달 헤더 — Solapi 그라데이션 */
.helpdesk-modal-header {
    background: linear-gradient(135deg, #4541FF 0%, #A788FF 100%);
    display: flex; justify-content: flex-start; align-items: center;
    gap: var(--hc-space-md); padding: 22px 24px 18px; flex-shrink: 0;
}
.helpdesk-modal-title {
    font-size: 17px; font-weight: 900; color: #ffffff !important;
    margin: 0; letter-spacing: -.3px; line-height: 1.4; flex: 1;
}
.helpdesk-modal-close {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; flex-shrink: 0; padding: 0;
    background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--hc-radius-md); color: rgba(255,255,255,.9) !important;
    font-family: var(--hc-font-family); font-size: 16px; font-weight: 700;
    cursor: pointer; transition: background var(--hc-transition-fast);
}
.helpdesk-modal-close:hover { background: rgba(255,255,255,.32); }
.helpdesk-modal-close i { color: rgba(255,255,255,.9) !important; font-size: 18px; }

.helpdesk-modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.helpdesk-modal-body::-webkit-scrollbar { width: 5px; }
.helpdesk-modal-body::-webkit-scrollbar-track { background: var(--hc-bg-tertiary); }
.helpdesk-modal-body::-webkit-scrollbar-thumb { background: var(--hc-border); border-radius: 3px; }

.helpdesk-modal-footer {
    display: flex; justify-content: flex-end; gap: var(--hc-space-sm);
    padding: 14px 24px; border-top: 1px solid var(--hc-border); flex-shrink: 0;
}
.helpdesk-modal-footer .helpdesk-btn.helpdesk-modal-close {
    min-width: 140px; padding: 10px 24px;
    background: var(--hc-bg-tertiary); border: 1.5px solid var(--hc-border);
    border-radius: var(--hc-radius-md); color: var(--hc-text-secondary) !important;
    font-size: var(--hc-font-size-base);
}
.helpdesk-modal-footer .helpdesk-btn.helpdesk-modal-close:hover {
    border-color: var(--hc-accent); color: var(--hc-accent) !important;
    background: var(--hc-bg-secondary);
}

/* ======================================== 게시글 상세 ======================================== */
.helpdesk-post-title {
    font-size: 20px; font-weight: 900; color: var(--hc-text-primary);
    margin: 0 0 var(--hc-space-md); letter-spacing: -.5px; line-height: 1.35;
}
.helpdesk-post-meta {
    display: flex; flex-wrap: wrap; gap: var(--hc-space-md);
    padding-bottom: var(--hc-space-md); margin-bottom: var(--hc-space-md);
    border-bottom: 1px solid var(--hc-border);
    font-size: var(--hc-font-size-sm); color: var(--hc-text-tertiary);
}
.helpdesk-post-meta span { display: flex; align-items: center; gap: 4px; }
.helpdesk-post-content { font-size: var(--hc-font-size-base); line-height: 1.8; color: var(--hc-text-secondary); }
.helpdesk-post-content p { margin: 0 0 var(--hc-space-md); }
.helpdesk-post-content img { max-width: 100%; border-radius: var(--hc-radius-md); }

/* ======================================== 폼 요소 ======================================== */
.helpdesk-form-group { margin-bottom: var(--hc-space-md); }
.helpdesk-form-label {
    display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700;
    letter-spacing: .3px; color: var(--hc-text-tertiary);
}
.helpdesk-form-input, .helpdesk-form-select, .helpdesk-form-textarea {
    width: 100%; padding: 10px 14px; font-family: var(--hc-font-family);
    font-size: var(--hc-font-size-base); color: var(--hc-text-primary);
    background: var(--hc-bg-input); border: 1.5px solid var(--hc-border);
    border-radius: var(--hc-radius-md); outline: none;
    transition: all var(--hc-transition-fast);
}
.helpdesk-form-input:focus, .helpdesk-form-select:focus, .helpdesk-form-textarea:focus {
    border-color: var(--hc-accent); box-shadow: 0 0 0 3px var(--hc-accent-glow);
    background: var(--hc-bg-secondary);
}
.helpdesk-form-input::placeholder, .helpdesk-form-textarea::placeholder { color: var(--hc-text-tertiary); }
.helpdesk-form-textarea { min-height: 150px; resize: vertical; line-height: 1.75; }

/* ======================================== 로딩/빈 상태 ======================================== */
.helpdesk-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: var(--hc-space-2xl); color: var(--hc-text-tertiary); gap: var(--hc-space-sm);
}
.helpdesk-loading i { font-size: 28px; color: var(--hc-accent); }
.ri-spin { animation: helpdesk-spin 1s linear infinite; }
@keyframes helpdesk-spin { to { transform: rotate(360deg); } }
.helpdesk-empty, .helpdesk-empty-state { text-align: center; padding: clamp(2rem,6vw,2.5rem); }
.helpdesk-empty i, .helpdesk-empty-state .helpdesk-empty-icon i {
    font-size: clamp(3rem,10vw,4rem); color: var(--hc-text-tertiary); opacity: .4;
    display: block; margin-bottom: var(--hc-space-md);
}
.helpdesk-empty-state .helpdesk-empty-title { font-size: var(--hc-font-size-lg); font-weight: 700; color: var(--hc-text-secondary); margin: 0 0 var(--hc-space-sm); }
.helpdesk-empty-state .helpdesk-empty-desc { font-size: var(--hc-font-size-sm); color: var(--hc-text-tertiary); margin: 0; }
.helpdesk-empty-state .helpdesk-empty-icon { margin-bottom: var(--hc-space-md); }

/* ======================================== 모바일 카드 ======================================== */
.helpdesk-mobile-cards { display: none; }
.helpdesk-mobile-card {
    background: var(--hc-bg-secondary); border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg); padding: 14px; margin-bottom: 8px;
    box-shadow: var(--hc-shadow-xs); cursor: pointer; transition: all var(--hc-transition-fast);
}
.helpdesk-mobile-card:hover { background: var(--hc-bg-tertiary); box-shadow: var(--hc-shadow-sm); }
.helpdesk-mobile-card.is-pinned { background: rgba(239,68,68,.03); border-left: 3px solid var(--hc-error); }
.helpdesk-mobile-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 8px; }
.helpdesk-mobile-card-number { font-size: 12px; font-weight: 600; color: var(--hc-text-tertiary); flex-shrink: 0; }
.helpdesk-mobile-card-title { flex: 1; }
.helpdesk-mobile-card-title h3, .helpdesk-mobile-card-title { font-size: 16px !important; font-weight: 700 !important; color: var(--hc-text-primary) !important; line-height: 1.4 !important; margin: 0 !important; }
.helpdesk-mobile-card-title a {
    color: var(--hc-text-primary, #1A1A2E) !important;
    transition: none;
}
.helpdesk-mobile-card-title a:hover {
    color: var(--hc-accent) !important;
    transition: color var(--hc-transition-fast);
}
.helpdesk-mobile-card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding-top: 8px; border-top: 1px solid var(--hc-border); font-size: 12px; color: var(--hc-text-tertiary); }
.helpdesk-mobile-card-author, .helpdesk-mobile-card-date, .helpdesk-mobile-card-views { display: flex; align-items: center; gap: 4px; }

/* ======================================== 반응형 ======================================== */
@media (max-width: 768px) {
    /* 테마 본문 영역 패딩을 벗어나 뷰포트 전체 너비 사용 + 좌우 여백 0 */
    body .helpdesk-page-backdrop,
    .helpdesk-page-backdrop {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
    .helpdesk-wrapper { padding: 24px 0 0; max-width: 100%; }
    /* 3개 게시판(공지/정보/Q&A) 모바일 좌우 패딩 10px */
    .helpdesk-board-container,
    .helpdesk-notice-board,
    .helpdesk-info-board,
    .helpdesk-qa-board { padding-left: 10px !important; padding-right: 10px !important; }
    .helpdesk-board-header { flex-direction: column; align-items: stretch; }
    .helpdesk-search-box { width: 100%; flex-wrap: wrap; }
    .helpdesk-search-input { flex: 1; min-width: 0; }
    .helpdesk-write-btn { flex-basis: 100%; width: 100%; justify-content: center; margin-top: 8px; }
    /* 사용안내·공지·FAQ·Q&A: 검색 입력 + 검색 버튼 + 글쓰기(아이콘만) 한 줄 */
    .helpdesk-video-board .helpdesk-search-box,
    .helpdesk-board__search-line .helpdesk-search-box {
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }
    .helpdesk-video-board .helpdesk-search-input,
    .helpdesk-board__search-line .helpdesk-search-input {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }
    .helpdesk-video-board .helpdesk-search-btn,
    .helpdesk-board__search-line .helpdesk-search-btn {
        flex: 0 0 auto;
    }
    .helpdesk-video-board .helpdesk-write-btn,
    .helpdesk-board__search-line .helpdesk-write-btn {
        position: relative;
        flex: 0 0 auto;
        flex-basis: auto;
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        margin-top: 0;
        justify-content: center;
        gap: 0;
    }
    .helpdesk-video-board .helpdesk-write-btn__label,
    .helpdesk-board__search-line .helpdesk-write-btn__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .helpdesk-board-table { display: none; }
    .helpdesk-mobile-cards { display: block; }
    /* 모바일: 게시글 번호(#n) 및 제목 옆 번호 표시([n]) 숨김 */
    .helpdesk-mobile-card-number { display: none !important; }
    .helpdesk-mobile-card-title .badge-answers { display: none !important; }
    .helpdesk-modal {
        padding: 90px 0 0 !important;
        align-items: flex-end;
        box-sizing: border-box;
    }
    .helpdesk-modal-container { border-radius: 20px 20px 0 0; max-height: 95vh; }
    .helpdesk-modal-header, .helpdesk-modal-body { padding-left: 18px; padding-right: 18px; }
    .helpdesk-modal-footer { flex-direction: column; padding: 14px 18px; }
    .helpdesk-modal-footer .helpdesk-btn { width: 100%; justify-content: center; }
    .helpdesk-post-title { font-size: 18px; }
    .helpdesk-post-meta { flex-direction: column; gap: 6px; }
    .helpdesk-pagination { flex-wrap: wrap; }
    .helpdesk-page-btn, .helpdesk-page-num { min-width: 32px; height: 32px; font-size: 12px; }
}
@media (max-width: 480px) {
    .helpdesk-tab { min-width: clamp(52px,16vw,90px); padding: 10px 8px; font-size: 12px; }
    .helpdesk-tab i { font-size: 18px; }
    /* 아이콘·아이디·날짜 가로 한 줄 유지 */
    .helpdesk-mobile-card-meta { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 12px; }
    .helpdesk-mobile-card-author,
    .helpdesk-mobile-card-date,
    .helpdesk-mobile-card-views { flex-shrink: 0; white-space: nowrap; }
    .helpdesk-modal-title { font-size: 15px; }
}

/* ======================================== 푸터 숨김 ======================================== */
body.helpdesk-page #colophon, body.helpdesk-page .site-footer,
body.helpdesk-page [class*="site-footer"], body.helpdesk-page [class*="ast-footer"] { display: none !important; }
body.helpdesk-page .mpf2-isolation-wrap {
    display: block !important; width: 100vw !important; max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important;
    flex-basis: 100% !important; clear: both !important; order: 9999 !important;
}

/*
 * Prisna 플로팅: 사용안내(비디오) 탭/단독 숏코드에서만 숨김.
 * 통합 [helpdesk] 는 #helpdesk-board-video.active 일 때만(:has). PHP는 단일·?board=video·[helpdesk_video] 제외.
 */
body.helpdesk-page:has(#helpdesk-board-video.active) #prisna-floating-wrapper,
body.helpdesk-page:has(#helpdesk-board-video.active) .prisna-wp-translate-floating,
body.helpdesk-page:has(#helpdesk-board-video.active) [class*="prisna-wp-translate-floating"],
body.helpdesk-page:not(:has(#helpdesk-main)):has(.helpdesk-video-board) #prisna-floating-wrapper,
body.helpdesk-page:not(:has(#helpdesk-main)):has(.helpdesk-video-board) .prisna-wp-translate-floating,
body.helpdesk-page:not(:has(#helpdesk-main)):has(.helpdesk-video-board) [class*="prisna-wp-translate-floating"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ======================================================
   HERO — Option A: Compact Bar
   Astra child 완전 격리 (인라인 스타일 우선, CSS는 보조)
   ====================================================== */

/* hover 효과만 CSS로 처리 (인라인 스타일이 base/active 담당) */
#hd-hero .hd-hero-btn:hover {
    background: rgba(255,255,255,.26) !important;
    border-color: rgba(255,255,255,.65) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* ── 모바일: 브랜드 숨김 시 탭(칩)만 가로 중앙 정렬 ── */
@media (max-width: 768px) {
    #hd-hero {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 16px !important;
        min-height: 56px !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
    }
    #hd-hero > div:nth-child(3) {
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    #hd-hero > div:nth-child(3) > div:first-child {
        flex-shrink: 0;
    }
    #hd-hero > div:nth-child(3) > div:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #hd-hero-chips {
        flex-shrink: 0 !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    #hd-hero-chips .hd-hero-btn {
        flex-shrink: 0 !important;
    }
    /* 모바일: HELPDESK 뱃지·헬프데스크 제목 영역 전체 숨김 (탭만 표시) */
    #hd-hero .hd-hero-brand {
        display: none !important;
    }
}

@media (max-width: 480px) {
    #hd-hero {
        padding: 10px 12px !important;
        gap: 8px !important;
    }
    #hd-hero .hd-hero-btn {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    #hd-hero .hd-hero-btn i {
        font-size: 12px !important;
    }
}
