/* Punsarn custom css */
@import url('https://fonts.googleapis.com/css2?family=Sarabun&display=swap');

html {
    zoom: 1.15;
}

body {
    font-family: 'Sarabun', sans-serif;
}

#authoritiestabs {
    display: none;
}

#header_search {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Custom Logo */
#logo {
    background: url('/punsarn/intranet/img/logo.png') no-repeat scroll 0 center !important;
    background-size: contain !important;
    width: 32px !important;
    /* Reduced for better fit */
    height: 32px !important;
    /* Fixed height to make background visible */
    display: block !important;
    padding: 0 !important;
    margin-right: 10px;
}

#logo img {
    display: none !important;
}

#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/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;
}

/* --- Toolbar Buttons Styling --- */
#toolbar .btn {
    border: 1px solid #D64935 !important;
    background-color: #fff !important;
    color: #D64935 !important;
    border-radius: 4px !important;
    margin-right: 5px !important;
}

#toolbar .btn:hover {
    background-color: #D64935 !important;
    color: #fff !important;
}

#toolbar .btn-group .btn {
    margin-right: 0 !important;
    /* Button groups handle their own spacing */
}

/* --- Authority Detail Labels Styling --- */
/* Relationship Labels (Used for, Broader, Narrower, Related) */
.auth .label {
    font-weight: 700 !important;
    color: #444;
    /* Enhancing contrast slightly */
}

/* Sub-heading Label */
#authority_subheadings h3 {
    font-weight: 700 !important;
    font-size: 16px;
}

/* Authority Detail Indentation */
#auth_detail .results_summary {
    margin-bottom: 2px;
    /* Minimized vertical gap between categories */
    margin-left: 25px;
    /* Global indent for all summary blocks */
}

#auth_detail .results_summary .label {
    display: block;
    margin-left: -25px;
    /* Pull the label back to the start of the line */
    margin-bottom: 0;
    font-size: 14px;
    color: #444;
}

#auth_detail .results_summary a {
    display: block;
    padding: 0;
    /* Minimized padding between lines */
    color: #BE1E2D !important;
    /* Punsarn red */
    text-decoration: none;
    font-weight: 500;
}

#auth_detail .results_summary a:hover {
    text-decoration: underline;
}

#auth_detail .results_summary>span:not(.label) {
    display: block;
    padding: 0;
}

/* Some link color not apply new theme */
#hierarchies a {
    color: #BE1E2D !important;
}

#authority_subheadings_tree a {
    color: #BE1E2D !important;
}

#breadcrumbs a {
    color: #BE1E2D !important;
}