/* assets/css/opac_style.css */

/* Style dasar pagination */
.pagination li a,
.pagination li span {
    color: #007bff;
    /* Biru Bootstrap */
    border: 1px solid #007bff;
    padding: 5px 10px;
    margin: 2px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

/* Hover effect */
.pagination li a:hover {
    background-color: #007bff;
    color: white;
}

/* Aktif / current page */
.pagination li.active span,
.pagination li.active a {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Improved Layout Styling */
.main-container {
    max-width: 1400px;
    /* Increased container width */
    margin: 0 auto;
}

.catalog-section {
    padding-left: 0;
    padding-right: 15px;
}

.sidebar-section {
    padding-left: 15px;
    padding-right: 25px;
}

/* Sidebar Styling */
.sidebar-container {
    position: sticky;
    top: 20px;
    width: 100%;
}

.sidebar-card {
    border: none;
    transition: transform 0.2s ease;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease forwards;
}

.sidebar-card:hover {
    transform: translateY(-2px);
}

.sidebar-card .card-header {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
}

.sidebar-card .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.sidebar-card .card-body {
    padding: 20px;
}

.sidebar-card:nth-child(1) {
    animation-delay: 0.1s;
}

.sidebar-card:nth-child(2) {
    animation-delay: 0.2s;
}

.sidebar-card:nth-child(3) {
    animation-delay: 0.3s;
}

.sidebar-card:nth-child(4) {
    animation-delay: 0.4s;
}


/* Statistics Items */
.stat-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 50%;
    margin-right: 15px;
}

.stat-icon i {
    font-size: 20px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.stat-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.stat-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.stat-section h6 {
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-list {
    max-height: 220px;
    overflow-y: auto;
}

.stat-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.stat-list-item:last-child {
    border-bottom: none;
}

.stat-name {
    flex: 1;
    font-size: 0.9rem;
    color: #555;
    text-decoration: none;
    margin-right: 10px;
}

.stat-name:hover {
    color: #007bff;
    text-decoration: underline;
}

.stat-list-item .badge {
    font-size: 0.75rem;
    min-width: 30px;
    text-align: center;
}

/* Catalog Card Styling */
.catalog-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.catalog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.catalog-card .card-header {
    background-color: #28a745;
    color: white;
    padding: 12px 15px;
}

.catalog-card .card-body {
    padding: 15px;
}

.book-cover-container {
    position: relative;
    margin-bottom: 10px;
}

.book-cover {
    max-width: 100px;
    max-height: 150px;
    width: 100%;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.book-cover-container:hover .book-overlay {
    opacity: 1;
    cursor: pointer;
}

/* Color variations for different sidebar sections */
.bg-gradient-primary {
    background: linear-gradient(135deg, rgb(105, 162, 202) 0%, rgba(48, 76, 113, 0.69) 100%);
}

.bg-gradient-success {
    background: linear-gradient(45deg, #28a745, #1e7e34) !important;
}

.bg-gradient-info {
    background: linear-gradient(45deg, #17a2b8, #117a8b) !important;
}

.bg-gradient-warning {
    background: linear-gradient(45deg, #ffc107, #e0a800) !important;
    color: #000 !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgb(105, 162, 202) 0%, rgba(48, 76, 113, 0.69) 100%);
    color: white;
    padding: 60px 0;
}

.hero-section h1 {
    color: white !important;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Search Box Styling */
.search-box .form-control,
.search-box .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
}

.search-box .btn {
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
}

.recommendation-search .card {
    border-radius: 10px;
    overflow: hidden;
}

/* Content Section */
.content-section {
    padding: 40px 0;
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .main-container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 991px) {
    .sidebar-container {
        position: static;
        margin-top: 30px;
    }

    .catalog-section,
    .sidebar-section {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 768px) {
    .book-cover-container {
        text-align: center;
        margin-bottom: 15px;
    }

    .catalog-card .row {
        flex-direction: column;
    }

    .catalog-card .col-4,
    .catalog-card .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .book-cover {
        max-width: 120px !important;
        max-height: 180px !important;
    }

    .stat-list {
        max-height: 150px;
    }
}

/* Scrollbar styling */
.stat-list::-webkit-scrollbar {
    width: 6px;
}

.stat-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.stat-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.stat-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for loading state */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}