/* ============================================================
   MULTI OPAC PATH - LIBRARY PAGE STYLES
   Path: plugins/multi_opac_path/assets/css/library_page.css
   Version: 1.1.0 (Selaras dengan navbar baru)
   ============================================================ */

:root {
    --primary-color: #0d6efd;
    --primary-light: #e7f1ff;
    --primary-dark: #0a58ca;
    --secondary-color: #1e293b;
    --bg-light-accent: #f8f9fa;
    --border-radius-lg: 16px;
    --border-radius-sm: 10px;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.12);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
}

/* ============================================================
   NAVBAR CUSTOM - SELARAS DENGAN _NAVBAR_LIBRARY.INC.PHP
   ============================================================ */
.navbar-custom-library {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.navbar-custom-library .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.3px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.navbar-custom-library .brand-logo {
    max-height: 38px;
    width: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

.navbar-custom-library .brand-text {
    display: inline-block;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-custom-library .nav-link {
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-custom-library .nav-link:hover,
.navbar-custom-library .nav-item.active .nav-link {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    color: #ffffff !important;
}

/* Dropdown menu */
.navbar-custom-library .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 220px;
}

.navbar-custom-library .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-custom-library .dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0d6efd;
}

.navbar-custom-library .dropdown-item.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
}

/* Library Switcher Dropdown */
.navbar-custom-library .library-dropdown .dropdown-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    color: white !important;
    transition: background 0.2s;
}

.navbar-custom-library .library-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.navbar-custom-library .library-dropdown .dropdown-toggle .lib-name {
    display: inline-block;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.navbar-custom-library .library-dropdown .dropdown-item .lib-name-dropdown {
    display: inline-block;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Member Dropdown */
.navbar-custom-library .member-dropdown .dropdown-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    color: white !important;
}

.navbar-custom-library .member-dropdown .dropdown-toggle .member-name {
    display: inline-block;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Toggler Mobile */
.navbar-custom-library .navbar-toggler {
    border: none;
    box-shadow: none;
    color: white;
}

.navbar-custom-library .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Navbar */
@media (max-width: 992px) {
    .navbar-custom-library .navbar-brand .brand-text {
        max-width: 150px;
    }
    .navbar-custom-library .library-dropdown .dropdown-toggle .lib-name {
        max-width: 80px;
    }
}

@media (max-width: 768px) {
    .navbar-custom-library .navbar-brand .brand-text {
        max-width: 100px;
        font-size: 0.95rem;
    }
    .navbar-custom-library .brand-logo {
        max-height: 30px;
    }
    .navbar-custom-library .library-dropdown .dropdown-toggle .lib-name {
        max-width: 60px;
    }
    .navbar-custom-library .member-dropdown .dropdown-toggle .member-name {
        max-width: 60px;
    }
    .navbar-custom-library .nav-link {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .navbar-custom-library .navbar-brand .brand-text {
        max-width: 70px;
        font-size: 0.85rem;
    }
    .navbar-custom-library .brand-logo {
        max-height: 25px;
    }
    .navbar-custom-library .library-dropdown .dropdown-toggle .lib-name {
        max-width: 50px;
    }
}

/* ============================================================
   HERO HEADER
   ============================================================ */
.library-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 2.5rem 0 3.5rem 0;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    position: relative;
}

.back-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.back-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.header-logo {
    max-height: 55px;
    width: auto;
    object-fit: contain;
    background: #ffffff;
    padding: 6px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0;
}

/* SEARCH BAR */
.search-wrapper, 
.integrated-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 6px;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 680px;
    width: 100%;
    overflow: hidden;
}

.search-wrapper .form-control,
.integrated-search-box .search-input-group input {
    border: none !important;
    box-shadow: none !important;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    background: transparent;
    outline: none;
    flex: 1;
}

.search-wrapper .form-control::placeholder {
    color: #94a3b8;
}

.search-wrapper .btn-theme,
.integrated-search-box .btn-search {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    white-space: nowrap;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.search-wrapper .btn-theme:hover,
.integrated-search-box .btn-search:hover {
    background-color: var(--primary-dark);
}

.library-switcher-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
}

.library-switcher-card select {
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
}

/* ============================================================
   CARDS & STATS
   ============================================================ */
.card-modern {
    border: 1px solid #f0f0f0;
    border-radius: var(--border-radius-lg);
    background: #ffffff;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
    height: 100%;
    max-width: 100%;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    border-left: 4px solid var(--primary-color);
}

.stat-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.75rem;
    margin-right: 12px;
    flex-shrink: 0;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2.5rem 0 1.25rem 0;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
}

.section-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--secondary-color);
    position: relative;
    padding-left: 14px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* ============================================================
   BOOK GRID & COVER
   ============================================================ */
.book-cover {
    aspect-ratio: 3 / 4;
    height: 180px;
    width: 100%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
    line-height: 1.3;
}

/* BUTTONS & BADGES */
.btn-theme {
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-theme:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.library-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* TOPIC GRID */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.topic-grid li {
    text-align: center;
}
.topic-grid li a {
    display: block;
    text-decoration: none;
    color: var(--secondary-color);
    transition: transform 0.2s;
}
.topic-grid li a:hover {
    transform: translateY(-4px);
}
.topic-grid li a img {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 6px;
}
.topic-grid li a span {
    font-size: 0.65rem;
    display: block;
    line-height: 1.2;
}

/* AVATAR LIBRARIAN */
.avatar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem auto;
    font-size: 1.5rem;
    color: var(--primary-color);
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* FOOTER */
.landing-footer {
    background-color: var(--secondary-color);
    color: #94a3b8;
    padding: 2.5rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.landing-footer .text-white {
    color: #ffffff !important;
}

/* ============================================================
   RESPONSIVE FIXES
   ============================================================ */
@media (max-width: 768px) {
    .library-header {
        padding: 2rem 0 2.5rem 0;
        border-radius: 0 0 20px 20px;
    }

    .header-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .search-wrapper,
    .integrated-search-box {
        border-radius: 16px;
        flex-direction: column;
        padding: 8px;
        gap: 8px;
    }

    .search-wrapper .form-control,
    .integrated-search-box .search-input-group input {
        width: 100%;
        padding: 0.5rem 0.75rem;
    }

    .search-wrapper .btn-theme,
    .integrated-search-box .btn-search {
        width: 100%;
        border-radius: 8px;
    }

    .topic-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    .topic-grid li a img {
        width: 36px;
        height: 36px;
    }
}

/* ============================================================
   MEMBER BASKET PAGE
   ============================================================ */
.basket-page-wrapper .table th {
    font-weight: 600;
    color: var(--secondary-color);
}

.basket-page-wrapper .table td {
    vertical-align: middle;
}

.basket-page-wrapper .badge {
    font-weight: 500;
}

.memberBasketInfo {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.memberBasketAction .btn {
    margin-right: 4px;
}

/* ============================================================
   FILTER SIDEBAR
   ============================================================ */
.filter-sidebar .filter-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.filter-sidebar .filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-sidebar .filter-list li {
    margin-bottom: 2px;
}

.filter-sidebar .filter-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    color: #495057;
    transition: background 0.2s;
}

.filter-sidebar .filter-list li a:hover {
    background: var(--primary-light);
}

.filter-sidebar .filter-list li a.active {
    background: var(--primary-light);
    color: var(--primary-color);
}