/**
 * TTBooks - 내 서재 페이지 전용 CSS
 */

/* 레이아웃 */
.my-books-container {
    display: flex;
    height: calc(100vh - 4rem);
}

/* 사이드바 */
.sidebar {
    width: 16rem;
    flex-shrink: 0;
}

/* 폴더 아이템 */
.folder-item {
    position: relative;
}

.folder-item:hover .folder-actions {
    opacity: 1;
}

.folder-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

/* 책 그리드 커스텀 (Tailwind 외 추가 스타일) */
.book-grid {
    display: grid;
    gap: 1.5rem;
}

/* 책 카드 */
.book-card {
    cursor: pointer;
}

.book-card .book-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.book-card img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* 텍스트 줄임표 */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 스크롤바 커스터마이징 */
.sidebar::-webkit-scrollbar,
.book-grid-container::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.book-grid-container::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.book-grid-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.book-grid-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 모달 애니메이션 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content {
    animation: modalFadeIn 0.2s ease-out;
}

/* 폴더 트리 들여쓰기 선 */
.folder-item::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e2e8f0;
}

.folder-item:last-child::before {
    display: none;
}

/* 상태 뱃지 커스텀 */
.status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* 검색 입력 포커스 효과 */
input[type="text"]:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* 드롭다운 선택 포커스 효과 */
select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* 버튼 호버 효과 강화 */
button:focus {
    outline: none;
}

button:focus-visible {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

/* 책 카드 호버 시 그림자 효과 */
.book-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 모달 최대 높이 조정 */
.review-modal-content {
    max-height: 90vh;
}

/* 탭 애니메이션 */
.tab-content {
    animation: fadeIn 0.3s ease-out;
}

/* 빈 상태 일러스트 */
.empty-state {
    padding: 5rem 2rem;
}

.empty-state svg {
    margin: 0 auto 1rem;
}

/* 로딩 스피너 중앙 정렬 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* 프로그레스 바 애니메이션 */
.progress-bar-fill {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 태그 칩 스타일 */
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background-color: #f3f4f6;
    color: #4b5563;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tag-chip:hover {
    background-color: #e5e7eb;
    cursor: pointer;
}

/* 책 추가 모달 */
.add-book-modal input,
.add-book-modal select,
.add-book-modal textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.add-book-modal input:focus,
.add-book-modal select:focus,
.add-book-modal textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.add-book-modal textarea {
    resize: vertical;
    min-height: 100px;
}

/* 반응형: 작은 화면 */
@media (max-width: 768px) {
    .my-books-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

/* 반응형: 중간 화면 */
@media (min-width: 768px) and (max-width: 1024px) {
    .sidebar {
        width: 14rem;
    }
    
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* 반응형: 큰 화면 */
@media (min-width: 1280px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 2rem;
    }
}

