/* Punsarn custom css */

#authoritiestabs {
    display: none;
}

#xslt {
    margin-top: 30px;
    font-size: 16px;
}

#xslt span.paragraph {
    margin-left: 50px;
}

#authorities_searchresultlist_results table {
    width: 100%;
    font-size: 13px;
}

#authorities_searchresultlist_results table tbody tr td:nth-child(2) {
    width: 180px;
}

#authorities_searchresultlist_results .callnumber {
    margin-top: 0.3em;
}

#authorities_searchresultlist_results table tbody tr td {
    padding: 10px;
}

#auth_detail #action {
    display: none;
}

#auth_detail .callnumber {
    font-size: 100%;
}

.results_summary {
    font-size: 100%;
}

#subheading .subheading_title {
    margin-left: 50px;
}

#subheading span.label {
    font-size: 16px;
}

#auth_searchresultlist span.narrower,
span.broader,
span.related {
    margin-left: 2em;
}

#sh-hierarchies a {
    color: #069;
    font-weight: 400;
    text-decoration: underline;
}

/* --- Flatten 'More' Dropdown --- */
/* Hide the 'More' text/toggle */
#toplevelmenu .dropdown-toggle {
    display: none !important;
}

/* Unwrap the dropdown container so items sit in the main flow */
#toplevelmenu li.dropdown,
#toplevelmenu .dropdown-menu {
    display: contents !important;
}

/* Style the dropdown items to look like main nav items */
#toplevelmenu .dropdown-item {
    display: inline-block !important;
    width: auto !important;
    padding: 0.5rem 1rem !important;
    /* MATCHED Patrons padding */
    font-size: 14.3px !important;
    /* MATCHED Patrons font size (approx 13px + scaling or rem) */
    line-height: 20px !important;
    /* MATCHED Patrons line height */
    color: rgba(255, 255, 255, 0.75) !important;
    background: transparent !important;
    border: none !important;
    font-weight: 400 !important;
    /* MATCHED Patrons font weight */
    transition: color 0.15s ease-in-out !important;
}

/* Hide icons in dropdown items (e.g., converted Patrons button) */
#toplevelmenu .dropdown-item .nav-link-icon {
    display: none !important;
}

/* Hover effect */
#toplevelmenu .dropdown-item:hover {
    color: #fff !important;
    text-decoration: none !important;
}

/* Ensure list items don't break layout */
#toplevelmenu li {
    display: inline-block !important;
}

/* --- Hide Unwanted Items (High Specificity) --- */
/* Top Level: Circulation, Search (Link/Dropdown/Advanced), Cart */
#toplevelmenu>ul>li:nth-child(1),
#toplevelmenu #catalog-search-link,
#toplevelmenu #catalog-search-dropdown,
#toplevelmenu #cartmenulink,
#toplevelmenu li:has(#cartmenulink),
#toplevelmenu li:has(a[href*="circulation-home.pl"]),
#toplevelmenu li:has(a[href*="course-reserves.pl"]) {
    display: none !important;
}

/* Dropdown Level: Lists, Cataloging, Acquisitions, Serials, Suggestions */
/* Using Attribute Selectors with ID context for max specificity */
#toplevelmenu .dropdown-item[href*="/cgi-bin/koha/virtualshelves/"],
#toplevelmenu .dropdown-item[href*="/cgi-bin/koha/cataloguing/"],
#toplevelmenu .dropdown-item[href*="/cgi-bin/koha/acqui/"],
#toplevelmenu .dropdown-item[href*="/cgi-bin/koha/serials/"],
#toplevelmenu .dropdown-item[href*="/cgi-bin/koha/suggestion/"] {
    display: none !important;
}