/* Books Listing Page Styles */

/* Import categories-selector component styles */
@import url("../components/categories-selector.css");
@import url("../components/modal.css");
@import url("../components/breadcrumb.css");

/* Friends Stories Slider */
.friends-stories-section {
    margin: 0 1rem 2rem 1rem;
    position: relative;
}

.stories-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--background-secondary);
    border: 1px solid var(--border-light);
    padding: 1rem;
}

.stories-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
}

.stories-slider::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.story-item:hover {
    transform: scale(1.05);
}

.story-item.active {
    transform: scale(1.1);
}

.story-item.active .story-ring {
    border-color: var(--primary-color);
    border-width: 3px;
}

.story-item.active .story-name {
    color: var(--primary-color);
    font-weight: 600;
}

.story-avatar-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.story-avatar-link:hover {
    transform: scale(1.05);
}

.story-avatar-link:hover .story-image,
.story-avatar-link:hover .story-placeholder {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.story-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
}

.story-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    transition: border-color 0.2s ease;
}

.story-ring.new {
    border: 3px solid var(--primary-color);
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    padding: 1px;
}

.story-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--background-primary);
}

.story-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
    border: 2px solid var(--background-primary);
}

.story-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.story-nav:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.story-nav-prev {
    left: 10px;
}

.story-nav-next {
    right: 10px;
}

.story-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.story-nav:disabled:hover {
    background: var(--background-primary);
    color: var(--text-color);
    transform: translateY(-50%);
}


/* Header */
.books-listing-header {
    text-align: center;
    padding: 1.5rem 2rem;
    background: var(--background-secondary);
    color: var(--text-color);
    border-radius: var(--radius);
    margin: 0 1rem 2rem 1rem;
    border: 1px solid var(--border-light);
    width: calc(100% - 2rem);
    box-sizing: border-box;
}

.books-listing-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
}

.books-description {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Categories Section (Pills) */
.categories-section {
    margin: 0 1rem 3rem 1rem;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.categories-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.categories-link {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid var(--primary-color);
    white-space: nowrap;
    opacity: 0.8;
}

.categories-link:hover {
    background: var(--primary-color);
    color: white;
    opacity: 1;
}


/* Books Section */
.books-section {
    margin-bottom: 4rem;
}

/* No books found */
.no-books-found {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    margin: 0 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-books-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-books-found h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.no-books-found p {
    margin: 0 0 2rem 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.no-books-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* No friends state */
.no-friends-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    margin: 0 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-friends-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-friends-state h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.no-friends-state p {
    margin: 0 0 2rem 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.no-friends-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Pagination */
.pagination-section {
    margin: 3rem 1rem;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pagination-link,
.pagination-current {
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    min-width: 44px;
    text-align: center;
}

.pagination-link {
    background: white;
    color: #667eea;
    border: 2px solid #e1e5e9;
}

.pagination-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.pagination-current {
    background: #667eea;
    color: white;
    border: 2px solid #667eea;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .friends-stories-section {
        margin: 0 0.5rem 2rem 0.5rem;
    }
    
    .stories-container {
        padding: 0.75rem;
    }
    
    .stories-slider {
        gap: 0.75rem;
    }
    
    .story-item {
        min-width: 60px;
    }
    
    .story-avatar {
        width: 50px;
        height: 50px;
    }
    
    .story-name {
        font-size: 0.75rem;
        max-width: 60px;
    }
    
    .story-nav {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .story-nav-prev {
        left: 5px;
    }
    
    .story-nav-next {
        right: 5px;
    }

    .books-listing-header {
        margin: 0 0.5rem 2rem 0.5rem;
        padding: 2rem 1rem;
    }
    
    .books-listing-header h1 {
        font-size: 2rem;
    }
    
    .books-description {
        font-size: 1rem;
    }
    
    .categories-section {
        margin: 0 0.5rem 2rem 0.5rem;
    }
    
    .categories-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .categories-link {
        width: 100%;
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .no-books-found {
        margin: 0 0.5rem;
        padding: 2rem 1rem;
    }
    
    .no-books-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .stories-container {
        padding: 0.5rem;
    }
    
    .stories-slider {
        gap: 0.5rem;
    }
    
    .story-item {
        min-width: 50px;
    }
    
    .story-avatar {
        width: 45px;
        height: 45px;
    }
    
    .story-name {
        font-size: 0.7rem;
        max-width: 50px;
    }
    
    .story-nav {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .books-listing-header h1 {
        font-size: 1.75rem;
    }
    
    .books-description {
        font-size: 0.9rem;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 0.5rem;
        min-width: 40px;
        font-size: 0.8rem;
    }
    
    .breadcrumb-list {
        font-size: 0.8rem;
    }
} 