/* /public/css/common.css */

@font-face {
    font-family: 'GmarketSans';
    src: url('/assets/fonts/GmarketSansTTFLight.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GmarketSans';
    src: url('/assets/fonts/GmarketSansTTFMedium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GmarketSans';
    src: url('/assets/fonts/GmarketSansTTFBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* 스켈레톤 로딩 스타일 (투명도 및 부드러운 호흡 애니메이션 적용) */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* 개별 텍스트 호환용 */
.skeleton {
    background-color: rgba(156, 163, 175, 0.35) !important;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

.dark .skeleton {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

/* 위젯 박스 전체 형태용 스켈레톤 클래스 추가 */
.skeleton-box {
    background-color: rgba(156, 163, 175, 0.25) !important;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

.dark .skeleton-box {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* 부모 컨테이너(.profile-card.loading) 제어 방식 */
.profile-card.loading #userDeptTag,
.profile-card.loading p,
.profile-card.loading h4,
.profile-card.loading span[id*="Badge"] {
    background-color: rgba(156, 163, 175, 0.35) !important;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

.dark .profile-card.loading #userDeptTag,
.dark .profile-card.loading p,
.dark .profile-card.loading h4,
.dark .profile-card.loading span[id*="Badge"] {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

/* 다크모드일 때 날짜/시간 입력폼의 네이티브 팝업과 아이콘을 다크 테마로 강제 전환 */
.dark input[type="date"],
.dark input[type="datetime-local"],
.dark input[type="month"] {
    color-scheme: dark;
}

/* ==========================================
   1. 대시보드 스타일 전역 커스텀 스크롤바
   ========================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ==========================================
   2. 탭 버튼 등 가로 스크롤바 숨김 유틸리티
   ========================================== */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 공통 커스텀 알럿 모달 스타일 */
.custom-modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.custom-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-box {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 22rem;
    padding: 1.5rem;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.dark .custom-modal-box {
    background-color: #1f2937;
    color: #f3f4f6;
    border: 1px solid #374151;
}

.custom-modal-backdrop.active .custom-modal-box {
    transform: scale(1);
}


/* 토스트 메시지 스타일 */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none; /* 클릭 방해 방지 */
}

.toast-item {
    background-color: #1f2937; /* 다크모드/라이트모드 공용 다크 배경 */
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
}

.toast-item.active {
    opacity: 1;
    transform: translateY(0);
}

.dark .toast-item {
    background-color: #374151;
    border: 1px solid #4b5563;
}