/* Community Book Search Results Page - Complete Styles */
/* Color Scheme: Navy Blue #1F2A44, Off White #F7F5F2 */
/* Fonts: Poppins (headlines), Roboto (body/subheadlines) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@300;400;500&display=swap');
:root {
    --primary-navy: #1F2A44;
    --secondary-offwhite: #F7F5F2;
    --accent-blue: #3B5998;
    --success-green: #28a745;
    --warning-orange: #ff9800;
    --error-red: #dc3545;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(31, 42, 68, 0.08);
    --shadow-md: 0 4px 12px rgba(31, 42, 68, 0.12);
    --shadow-lg: 0 8px 24px rgba(31, 42, 68, 0.16);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    background-color: var(--secondary-offwhite);
    line-height: 1.6;
}
/* ============================================
   LANDING PAGE STYLES
   ============================================ */
.cbs-wrapper.cbs-landing {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}
.cbs-header {
    text-align: center;
    margin-bottom: 40px;
}
.cbs-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 12px;
    line-height: 1.2;
}
.cbs-header p {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-light);
}
/* Search Type Selection */
.cbs-search-type {
    margin-bottom: 32px;
}
.cbs-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}
.cbs-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--secondary-offwhite);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}
.cbs-type-btn:hover {
    border-color: var(--primary-navy);
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.cbs-type-btn.active {
    background: var(--primary-navy);
    color: white;
    border-color: var(--primary-navy);
    box-shadow: var(--shadow-md);
}
.cbs-type-btn .cbs-icon {
    font-size: 2rem;
}
/* Search Box */
.cbs-search-box {
    display: flex;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}
.cbs-input-group {
    flex: 1;
    position: relative;
}
#cbs-search-input {
    width: 100%;
    padding: 16px 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}
#cbs-search-input:focus {
    outline: none;
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(31, 42, 68, 0.1);
}
.cbs-btn-primary {
    padding: 16px 32px;
    background: var(--primary-navy);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.cbs-btn-primary:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
/* Suggestions Dropdown */
.cbs-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-md);
}
.cbs-suggestions.active {
    display: block;
}
.cbs-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--secondary-offwhite);
}
.cbs-suggestion-item:last-child {
    border-bottom: none;
}
.cbs-suggestion-item:hover {
    background: var(--secondary-offwhite);
    color: var(--primary-navy);
}
/* ============================================
   RESULTS PAGE LAYOUT
   ============================================ */
.cbs-results-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}
/* ============================================
   SIDEBAR FILTERS
   ============================================ */
.cbs-sidebar {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 20px;
}
.cbs-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--secondary-offwhite);
}
.cbs-sidebar-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-navy);
}
.cbs-clear-filters {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}
.cbs-clear-filters:hover {
    color: var(--primary-navy);
    text-decoration: underline;
}
.cbs-filter-section {
    margin-bottom: 24px;
}
.cbs-filter-section h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 12px;
}
.cbs-filter-select {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}
.cbs-filter-select:focus {
    outline: none;
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(31, 42, 68, 0.1);
}
.cbs-filter-select:hover {
    border-color: var(--accent-blue);
}
/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.cbs-main-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    min-height: 600px;
}
.cbs-results-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--secondary-offwhite);
}
.cbs-search-info h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 8px;
}
.cbs-search-info p {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
}
/* Loading State */
.cbs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}
.cbs-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--secondary-offwhite);
    border-top: 4px solid var(--primary-navy);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.cbs-loading p {
    margin-top: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: var(--text-light);
}
/* ============================================
   RESULTS DISPLAY
   ============================================ */
.cbs-community-section {
    margin-bottom: 48px;
}
.cbs-community-section:last-child {
    margin-bottom: 0;
}
.cbs-community-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-offwhite);
}
.cbs-community-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-navy);
}
.cbs-community-count {
    background: var(--primary-navy);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}
/* Book Grid - 5 cards per row */
.cbs-books-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}
/* Book Card */
.cbs-book-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.cbs-book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-navy);
}
.cbs-book-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: var(--secondary-offwhite);
    overflow: hidden;
}
.cbs-book-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px !important;
    background: white;
    object-fit: cover;
}
.cbs-book-author-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(31, 42, 68, 0.95), rgba(31, 42, 68, 0.7));
    color: white;
    padding: 10px 16px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cbs-book-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}
.cbs-book-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin: 0;
    line-height: 1.4;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cbs-book-title a {
    color: var(--primary-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}
.cbs-book-title a:hover {
    color: var(--accent-blue);
}
/* Empty State */
.cbs-empty-state {
    text-align: center;
    padding: 80px 20px;
}
.cbs-empty-state .emoji {
    font-size: 4rem;
    margin-bottom: 20px;
}
.cbs-empty-state h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 12px;
}
.cbs-empty-state p {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: var(--text-light);
}
/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .cbs-results-wrapper {
        grid-template-columns: 1fr;
    }
    .cbs-sidebar {
        position: static;
        margin-bottom: 24px;
    }
    .cbs-books-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
    .cbs-header h1 {
        font-size: 2rem;
    }
    .cbs-header p {
        font-size: 1rem;
    }
    .cbs-search-box {
        flex-direction: column;
    }
    .cbs-btn-primary {
        width: 100%;
    }
    .cbs-type-grid {
        grid-template-columns: 1fr;
    }
    .cbs-books-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    .cbs-main-content {
        padding: 20px;
    }
    .cbs-search-info h2 {
        font-size: 1.5rem;
    }
}
@media (max-width: 480px) {
    .cbs-wrapper.cbs-landing {
        margin: 20px auto;
        padding: 24px 16px;
    }
    .cbs-header h1 {
        font-size: 1.5rem;
    }
    .cbs-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .cbs-sidebar {
        padding: 16px;
    }
    .cbs-results-wrapper {
        padding: 0 12px;
        margin: 20px auto;
    }
}
@media (max-width: 360px) {
    .cbs-books-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================================
   UTILITY CLASSES
   ============================================ */
.cbs-hidden {
    display: none !important;
}
.cbs-text-center {
    text-align: center;
}
.cbs-mt-1 {
    margin-top: 8px;
}
.cbs-mt-2 {
    margin-top: 16px;
}
.cbs-mt-3 {
    margin-top: 24px;
}
.cbs-mt-4 {
    margin-top: 32px;
}
.cbs-mb-1 {
    margin-bottom: 8px;
}
.cbs-mb-2 {
    margin-bottom: 16px;
}
.cbs-mb-3 {
    margin-bottom: 24px;
}
.cbs-mb-4 {
    margin-bottom: 32px;
}