/* Tailwind CSS 오버라이드 및 추가 스타일 */

/* 전역 설정 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
}

/* 멘션 링크 스타일 */
.mention-link {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mention-link:hover {
    color: #1d4ed8;
}

/* 멘션 드롭다운 스타일 */
.mention-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.mention-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.mention-dropdown-item:hover {
    background-color: #f9fafb;
}

.mention-dropdown-item:last-child {
    border-bottom: none;
}

/* 로딩 애니메이션 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* 커스텀 스크롤바 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* P 버튼 강제 스타일 (CSS 충돌 방지) */
#people-list-btn {
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 1000 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    min-height: 40px !important;
    background-color: #f3f4f6 !important;
    border: 2px solid #d1d5db !important;
    border-radius: 50% !important;
    color: #374151 !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: all 0.2s ease !important;
}

/* 데스크톱에서 P 버튼 숨기기 */
@media (min-width: 768px) {
    #people-list-btn {
        display: none !important;
    }
}

#people-list-btn:hover {
    background-color: #e5e7eb !important;
    border-color: #9ca3af !important;
    transform: scale(1.05) !important;
}

#people-list-btn:active {
    transform: scale(0.95) !important;
    background-color: #d1d5db !important;
}

/* 모바일에서 P 버튼 크기 조정 */
@media (max-width: 768px) {
    #people-list-btn {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 18px !important;
    }
}

/* 포커스 스타일 개선 */
.focus-ring:focus {
    outline: none;
    ring: 2px;
    ring-color: #03C75A;
    ring-offset: 2px;
}

/* 모바일 터치 개선 */
@media (max-width: 768px) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 모바일에서 더 큰 터치 영역 */
    button, input, select, textarea {
        min-height: 44px;
    }
}

/* iPhone Mini 및 작은 화면 최적화 */
@media (max-width: 375px) {
    /* 헤더 최적화 */
    .header {
        min-height: 48px !important;
    }
    
    /* 로고 크기 조정 */
    .header .logo {
        font-size: 1rem !important;
    }
    
    /* 네비게이션 버튼 최적화 */
    .nav-btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
        min-height: 32px !important;
    }
    
    /* 우측 버튼들 최적화 */
    .header-right button {
        min-height: 32px !important;
        min-width: 32px !important;
    }
    
    /* LLM 대화 버튼 텍스트 크기 조정 */
    .llm-chat-btn {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* 매우 작은 화면 (iPhone SE 등) */
@media (max-width: 320px) {
    /* 헤더 패딩 최소화 */
    .header .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* 로고 크기 더 작게 */
    .header .logo {
        font-size: 0.875rem !important;
    }
    
    /* 네비게이션 버튼 더 작게 */
    .nav-btn {
        padding: 0.125rem 0.25rem !important;
        font-size: 0.625rem !important;
        min-height: 28px !important;
    }
    
    /* 우측 버튼들 더 작게 */
    .header-right button {
        min-height: 28px !important;
        min-width: 28px !important;
    }
    
    /* LLM 대화 버튼 더 작게 */
    .llm-chat-btn {
        font-size: 0.625rem !important;
        padding: 0.125rem 0.25rem !important;
    }
}

/* 다크 모드 지원 (향후 확장용) */
@media (prefers-color-scheme: dark) {
    /* 다크 모드 스타일은 향후 추가 */
}

/* 인쇄 스타일 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
