/* * 경로: /theme/ak_theme/css/style.css */
/* 설명: AK 테마 공통 스타일 (Tailwind 및 그누보드 필수 코어 보정, 사이드뷰, 페이징 디자인) */

/* 1. 그누보드 필수 스크린리더 숨김 클래스 */
.sound_only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

/* 2. 스크롤바 숨김 유틸리티 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 3. 카테고리 탭 점(bullet) 제거 및 여백 초기화 */
#bo_cate, #bo_cate_ul, #bo_cate ul, #bo_cate li {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#bo_cate ul {
    display: flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    flex-wrap: nowrap !important;
}

#bo_cate li {
    display: inline-block !important;
    margin: 0 !important;
}

#bo_cate a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.375rem 0.875rem !important;
    border-radius: 9999px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
}

.dark #bo_cate a {
    background-color: #334155 !important;
    color: #cbd5e1 !important;
}

#bo_cate #bo_cate_on {
    background-color: #14b8a6 !important;
    color: #ffffff !important;
}

.dark #bo_cate #bo_cate_on {
    background-color: #14b8a6 !important;
    color: #ffffff !important;
}

/* 4. GNB 2차 서브메뉴 드롭다운 잘림 방지 및 호버 표시 보정 */
.ak-gnb-item {
    position: relative;
}

.ak-gnb-item:hover .ak-gnb-sub,
.ak-gnb-item:focus-within .ak-gnb-sub {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (min-width: 1024px) {
    .ak-gnb .overflow-x-auto,
    .ak-gnb .no-scrollbar {
        overflow: visible !important;
    }
}

/* 5. 캡차 자동등록방지 스타일 보정 (작은 가로형) */
#captcha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: #fff;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    max-width: 480px;
}

.dark #captcha {
    background: #1e293b;
    border-color: #334155;
}

#captcha legend {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#captcha img {
    height: 40px;
    border-radius: 4px;
    object-fit: contain;
}

#captcha_key {
    margin: 0;
    padding: 8px 12px;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    font-size: 16px;
    font-weight: bold;
    background: #f8fafc;
    width: 130px;
    text-align: center;
    color: #0f172a;
}

.dark #captcha_key {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

#captcha_mp3, #captcha_reload {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0 !important;
    color: transparent !important;
    overflow: hidden;
}

#captcha_mp3::before, #captcha_reload::before {
    font-family: "FontAwesome", "Font Awesome 6 Free";
    font-weight: 900;
    color: #4b5563;
    font-size: 18px !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

#captcha_mp3::before { content: "\f144"; }
#captcha_reload::before { content: "\f021"; }

#captcha_mp3:hover, #captcha_reload:hover {
    background: #f1f5f9;
}

.dark #captcha_mp3, .dark #captcha_reload {
    background: #1e293b;
    border-color: #475569;
}

.dark #captcha_mp3::before, .dark #captcha_reload::before {
    color: #94a3b8;
}

.dark #captcha_mp3:hover, .dark #captcha_reload:hover {
    background: #334155;
}

#captcha_info {
    display: block;
    width: 100%;
    margin: 4px 0 0 0;
    font-size: 11px;
    color: #6b7280;
    text-align: left;
}

.dark #captcha_info {
    color: #94a3b8;
}

/* 6. 그누보드 회원 닉네임 사이드뷰 (Sideview) 레이어 팝업 스타일 */
.sv_wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center;
    vertical-align: middle;
    font-weight: 700;
    line-height: normal;
}

.sv_wrap .sv_member,
.sv_wrap a.sv_member {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem;
    color: inherit !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: color 0.15s ease-in-out;
}

.sv_wrap .sv_member:hover,
.sv_wrap a.sv_member:hover {
    color: #0d9488 !important;
    text-decoration: none !important;
}

.dark .sv_wrap .sv_member:hover,
.dark .sv_wrap a.sv_member:hover {
    color: #2dd4bf !important;
    text-decoration: none !important;
}

.sv_wrap noscript,
.sv_wrap .sv_nojs,
noscript.sv_nojs {
    display: none !important;
}

.sv_wrap .sv {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999 !important;
    min-width: 130px;
    padding: 6px 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    text-align: left;
    white-space: nowrap;
}

.dark .sv_wrap .sv {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
}

.sv_wrap .sv a {
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    padding: 8px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
    transition: background-color 0.15s, color 0.15s;
}

.sv_wrap .sv a:hover {
    background-color: #f0fdfa !important;
    color: #0d9488 !important;
    text-decoration: none !important;
}

.dark .sv_wrap .sv a {
    color: #cbd5e1 !important;
}

.dark .sv_wrap .sv a:hover {
    background-color: #334155 !important;
    color: #2dd4bf !important;
    text-decoration: none !important;
}

.sv_wrap.sv_on .sv {
    display: block !important;
}

/* 7. 그누보드 표준 페이징 (Pagination) 모던 카드 & 아이콘 UI 전면 보정 */
.pg_wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2rem 0 1rem 0 !important;
    width: 100% !important;
    clear: both;
}

.pg {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem !important;
    flex-wrap: wrap !important;
}

/* 페이징 내부 스크린리더 텍스트 완전 숨김 (불필요한 공백 제거) */
.pg_wrap .sound_only,
.pg .sound_only {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
}

/* 페이징 모든 버튼 공통 스타일 */
.pg_page,
.pg_current,
.pg_start,
.pg_prev,
.pg_next,
.pg_end {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.25rem !important; /* 36px */
    width: 2.25rem !important;     /* 36px */
    height: 2.25rem !important;    /* 36px */
    padding: 0 !important;
    border-radius: 0.75rem !important; /* rounded-xl */
    font-size: 0.8125rem !important;  /* 13px */
    font-weight: 700 !important;
    font-family: inherit !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    user-select: none !important;
    position: relative !important;
}

/* 일반 페이지 번호 버튼 */
.pg_page {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.pg_page:hover {
    background-color: #f0fdfa !important;
    border-color: #14b8a6 !important;
    color: #0d9488 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06) !important;
}

/* 현재 활성화된 페이지 번호 (그라디언트 뱃지) */
.pg_current {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
    border: 1px solid #0f766e !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px -2px rgba(20, 184, 166, 0.45) !important;
    font-weight: 800 !important;
}

/* 내비게이션 버튼 (처음, 이전, 다음, 맨끝) - 텍스트 숨기고 폰트어썸 아이콘 대체 */
.pg_start,
.pg_prev,
.pg_next,
.pg_end {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0 !important;
    color: transparent !important;
    overflow: hidden !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.pg_start::before,
.pg_prev::before,
.pg_next::before,
.pg_end::before {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-size: 12px !important;
    color: #64748b !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    line-height: 1 !important;
    display: block !important;
    transition: color 0.15s ease-in-out !important;
}

.pg_start::before { content: "\f100" !important; } /* fa-angles-left */
.pg_prev::before  { content: "\f104" !important; } /* fa-angle-left */
.pg_next::before  { content: "\f105" !important; } /* fa-angle-right */
.pg_end::before   { content: "\f101" !important; } /* fa-angles-right */

.pg_start:hover,
.pg_prev:hover,
.pg_next:hover,
.pg_end:hover {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08) !important;
}

.pg_start:hover::before,
.pg_prev:hover::before,
.pg_next:hover::before,
.pg_end:hover::before {
    color: #0f172a !important;
}

/* 다크모드 페이징 스타일링 */
.dark .pg_page {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
}

.dark .pg_page:hover {
    background-color: #334155 !important;
    border-color: #2dd4bf !important;
    color: #2dd4bf !important;
    box-shadow: 0 4px 10px -1px rgba(0, 0, 0, 0.4) !important;
}

.dark .pg_current {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
    border-color: #14b8a6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px -2px rgba(20, 184, 166, 0.5) !important;
}

.dark .pg_start,
.dark .pg_prev,
.dark .pg_next,
.dark .pg_end {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
}

.dark .pg_start::before,
.dark .pg_prev::before,
.dark .pg_next::before,
.dark .pg_end::before {
    color: #94a3b8 !important;
}

.dark .pg_start:hover,
.dark .pg_prev:hover,
.dark .pg_next:hover,
.dark .pg_end:hover {
    background-color: #1e293b !important;
    border-color: #475569 !important;
}

.dark .pg_start:hover::before,
.dark .pg_prev:hover::before,
.dark .pg_next:hover::before,
.dark .pg_end:hover::before {
    color: #f1f5f9 !important;
}