/*
Theme Name: CCSU Elihu Burritt Library Bootstrap 5
Theme URI:
Description: A custom Wordpress theme built by the Elihu Burritt Library (Sharon Clapp, Digital Resources Librarian in 2025) using Bootstrap 5 to emulate the look/feel/branding of CCSU's main website
Author: Sharon Clapp, MLIS, for CCSU's Elihu Burritt Library
Author URI
Version: 1.0.0
Text Domain: ccsu-library-bs5
*/
#library-logo {
   width: 250px;
    height: auto;
    object-fit: contain;
    display: inline-block;
    overflow: visible;
}
.cs-search-style {
    background-color:#fff
    color:#205898;
}
.cs-search-style h6 {
    color: #205898;
    font-size:1.1rem;
    font-style:italic;
}

#libhours i {
    color: #ffc107;
}


/* Target the custom class you already have on your inputs */
.input-field {
    border: none !important; /* Remove the default box border */
    border-bottom: 2px solid rgb(190, 190, 190) !important; /* Apply the CCSU style */
    border-radius: 0 !important; /* Underlined styles look better with square corners */
    background-color: transparent; /* Allows it to blend with your form background */
    padding: 0.5rem 0;
    transition: border-bottom-color 0.2s ease;
}

/* Add a focus state to make it accessible and interactive */
.input-field:focus {
    outline: none;
    border-bottom-color: #205998; /* Changes to CCSU Blue when clicking in */
    box-shadow: none; /* Removes the default Bootstrap blue glow */
}

/* Ensure the select box (dropdown) aligns height-wise with the text input */
select.input-field {
    height: calc(1.5em + 1rem + 2px); /* Matches standard BS5 height */
    cursor: pointer;
}
/* Styling the Scope Selector */
select#scopeChoice.input-field {
    font-size: 1.25rem; /* Larger font size for visibility on overlays */
    font-weight: 400;
    color: #333;
    padding: 0.5rem 2rem 0.5rem 0.5rem; /* Extra right padding for the custom arrow */
    border: none !important;
    border-bottom: 2px solid rgb(190, 190, 190) !important;
    border-radius: 0 !important;
    background-color: transparent;
    cursor: pointer;
    
    /* Custom Arrow for CCSU aesthetic */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23205998' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 1.2rem;
    
    transition: border-bottom-color 0.2s ease, font-size 0.2s ease;
}

/* Hover & Focus states */
select#scopeChoice.input-field:focus {
    outline: none;
    border-bottom-color: #205998 !important; /* CCSU Blue */
}

/* Dropdown options styling */
select#scopeChoice option {
    font-size: 1rem; /* Standard size inside the menu for readability */
    color: #000;
    background-color: #fff;
}

/* Media Query for mobile scaling */
@media (max-width: 768px) {
    select#scopeChoice.input-field {
        font-size: 1.1rem; /* Slightly smaller on mobile to prevent overflow */
        width: 100% !important; /* Full width on small screens */
        margin-left: 0 !important;
    }
}
/* Apply to both the text input and the select dropdown */
.input-field {
    /* 1. Typography: Large & Accessible */
    font-size: 1.25rem !important; /* Approx 20px - easy to read on overlays */
    font-family: inherit;
    color: #333;

    /* 2. Shape: Sharp Right Angles */
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;

    /* 3. Border: The CCSU Underline Style */
    border: none !important;
    border-bottom: 2px solid rgb(190, 190, 190) !important;
    
    /* 4. Background & Spacing */
    background-color: transparent !important;
    padding: 0.75rem 0.5rem;
    transition: border-bottom-color 0.2s ease-in-out;
}

/* Specific adjustments for the Select box to ensure it matches the text input */
select#scopeChoice.input-field {
    cursor: pointer;
    /* Increase right padding to accommodate the dropdown arrow */
    padding-right: 2.5rem;
    
    /* Custom Arrow: Using CCSU Blue (#205998) and a sharp geometric shape */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23205998' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.2rem;
}

/* Focus State */
.input-field:focus {
    outline: none !important;
    border-bottom-color: #205998 !important; /* CCSU Blue on focus */
    box-shadow: none !important; /* Remove Bootstrap's default glow */
}

/* Ensure options inside the dropdown are legible */
#scopeChoice {
    font-size: 1.1rem;
    padding: 6px;
    background: #fff;
    color: #333;
    border: none !important;
    border-bottom: 2px solid rgb(190, 190, 190) !important;
    border-radius: 0 !important;
    background-color: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#scopeChoice option {
    font-size: 1.1rem;
    padding: 6px;
    background: #fff;
    color: #333;
}
/* new styling added as I work on the accessibility and form focus issues for CentralSearch */
#scopeDescription {
    border-left: 2px solid #205998; /* Accent line on the left to tie in CCSU Blue */
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    background: rgba(0, 0, 0, 0.03); /* Very subtle backing to define the area */
    padding-top: 4px;
    padding-bottom: 4px;
    /* Ensuring the right-angle look */
    border-radius: 0 !important; 
}

/* Optional: Subtle transition for text swaps */
#scopeDescription {
    transition: opacity 0.2s ease-in-out;
}
/* Custom focus state for all inputs and buttons */
.input-field:focus, 
#go:focus {
    outline: 3px solid #205998 !important; /* Thick CCSU Blue border */
    outline-offset: 2px; /* Small gap to make it pop */
    border-bottom-color: transparent !important; /* Hide the underline when focused */
    box-shadow: none !important; /* Remove the default Bootstrap glow */
}

/* Ensure the select box is keyboard accessible */
select#scopeChoice:focus {
    background-color: #f8f9fa; /* Slight tint so user knows they are 'inside' it */
}


/* =========================================
   BOOTSTRAP 5 GLOBAL OVERRIDES (CSS Variables)
   ========================================= */
:root {
    /* 1. BRAND COLORS */
    /* Updating these changes .btn-primary, .bg-primary, links, etc. */
    --bs-primary: #205998;       /* CCSU Light Blue */
    --bs-secondary: #072141;     /* CCSU Dark Blue */
    
    /* 2. FONTS */
    /* These CSS variables override Bootstrap's compiled fonts */
    /* Primary source is SCSS variables in src/scss/_variables.scss */
    /* Body/paragraph text and headings both use: Roboto, Montserrat, Arial, sans-serif */
    --bs-body-font-family: 'Roboto', "Montserrat", Arial, sans-serif;
    --bs-font-sans-serif: var(--bs-body-font-family); /* Bootstrap 5 uses this */
    --bs-headings-font-family: 'Roboto', "Montserrat", Arial, sans-serif;
    --bs-headings-font-weight: 600;
    
    /* 3. GLOBAL STYLING */
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
    --bs-link-color: #205998;
    --bs-link-hover-color: #003d7a; /* Darker version of primary */
    
    /* 4. COMPONENT OVERRIDES */
    --bs-border-radius: 0.25rem; /* Make buttons slightly more square? */
    --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* Soften shadows */
}

/* Specific Button Tweaks 
   Sometimes needed because BS5 buttons set their own internal variables 
*/
.btn-primary {
    --bs-btn-bg: #205998;
    --bs-btn-border-color: #205998;
    --bs-btn-hover-bg: #184578; /* Manually darken 10% */
    --bs-btn-hover-border-color: #164070;
}

.btn-secondary {
    --bs-btn-bg: #072141;
    --bs-btn-border-color: #072141;
    --bs-btn-hover-bg: #051830;
    --bs-btn-hover-border-color: #041428;
}
/* =========================================
   FOOTER COLOR OVERRIDE
   ========================================= */
/* Targets the standard WordPress footer ID and Bootstrap class */
#colophon, 
.site-footer,
footer.bg-primary {
    background-color: #205998 !important; /* Forces CCSU Light Blue */
    color: #ffffff; /* Ensures text remains white */
}

/* Optional: If you have links in the footer, make sure they are readable */
#colophon a,
.site-footer a {
    color: #ffffff;
    text-decoration: underline;
}

#colophon a:hover,
.site-footer a:hover {
    color: #ffc107; /* CCSU Gold on hover */
    text-decoration: none;
}

/* =========================================
   UNIVERSITY-STYLE NEWS SECTION
   Shortcode: [ccsu_news_section]
   Bootstrap 5 handles layout; this file handles CCSU brand colours only.
   ========================================= */
.ccsu-news-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #072141;
}

.ccsu-news-all-link {
    color: #205998;
    text-decoration: none;
}

.ccsu-news-all-link:hover {
    color: #072141;
    text-decoration: underline;
}

/* Fixed-height featured image — full width, cover crop */
.ccsu-news-featured-img {
    height: 260px;
    object-fit: cover;
}

/* Fixed-height list thumbnails — cover crop */
.ccsu-news-list-thumb {
    height: 85px;
    object-fit: cover;
}

/* Placeholder when a list post has no featured image */
.ccsu-news-list-thumb-placeholder {
    height: 85px;
}

/* Date label — CCSU blue, small caps */
.ccsu-news-date {
    color: #205998;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Post title links — dark by default, blue on hover */
.ccsu-news-title-link,
.ccsu-news-title-link:visited {
    color: #212529;
    text-decoration: none;
}

.ccsu-news-title-link:hover {
    color: #205998;
}

/* =========================================
   SEARCH CARD ICON AREA
   Used by [ccsu_search_databases], [ccsu_search_guides],
   [ccsu_search_journals], [ccsu_search_scholar]
   Background colour and icon colour are set via inline style per card.
   ========================================= */
.ccsu-search-card-icon {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ccsu-search-card-icon .bi {
    font-size: 8rem;
}

/* =========================================
   NEWS CARDS — fallback image area
   Pattern: ccsu-theme/news-cards-section
   Shortcode: [ccsu_news_cards]
   ========================================= */

/* Suppress the gradient overlay when showing a solid-colour fallback */
.ccsu-card-img.ccsu-card-img-has-fallback::after {
    display: none;
}

/* Fallback link fills the entire .ccsu-card-img area */
.ccsu-card-fallback-link {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccsu-card-fallback-icon {
    font-size: 4rem;
}

/* Read More button — white text on dark blue; hover: light blue bg, dark blue text.
   Must use a. prefix + !important: the global --bs-link-color on <a> tags
   outranks the Bootstrap button CSS variable otherwise. */
a.ccsu-card-readmore,
a.ccsu-card-readmore:visited {
    color: #ffffff !important;
}

a.ccsu-card-readmore:hover,
a.ccsu-card-readmore:focus {
    background-color: #B6D3EC !important;
    border-color: #B6D3EC !important;
    color: #072141 !important;
}

/* =========================================
   SERVICE LINK CARDS
   [ccsu_service_reserves], [ccsu_service_sharing],
   [ccsu_service_librarian], [ccsu_service_grid]
   ========================================= */

/* Full-width blue band — wraps all three cards in [ccsu_service_grid].
   Width and left offset are set by stretchServiceSections() in library-searches.js
   which reads the element's real screen position — CSS-only viewport tricks are
   unreliable inside WordPress's .wp-block-shortcode wrapper. */
.ccsu-service-section {
    background-color: #205998;
    padding: 2.5rem 0;
    position: relative; /* establishes stacking context for inner z-index if needed */
}

/* Individual card — provides blue bg when used standalone outside the section */
.ccsu-service-card {
    background-color: #205998;
    padding: 2rem 1.5rem;
    height: 100%;
}

/* Inside the grid the section already provides the blue bg; card is transparent */
.ccsu-service-section .ccsu-service-card {
    background-color: transparent;
    padding: 1rem 1.5rem;
}

/* Link wrapper: icon + title as one tap target */
a.ccsu-service-link,
a.ccsu-service-link:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}

a.ccsu-service-link:hover,
a.ccsu-service-link:focus {
    color: #ffc107 !important; /* CCSU gold on hover */
    text-decoration: none !important;
}

/* Large icon — matches search card scale */
.ccsu-service-icon {
    font-size: 8rem;
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

/* Title — underlined to signal it's a link */
.ccsu-service-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: underline;
    display: block;
}

/* =========================================
   LEGACY WEBSITE BUTTON
   Secondary nav bar — desktop: gold button between logo and mega menu.
   Mobile: same button inside the hamburger dropdown (d-lg-none copy).
   ========================================= */
.ccsu-legacy-btn {
    background-color: #ffc107;      /* CCSU Gold */
    color: #072141 !important;      /* CCSU Dark Blue text */
    border: 2px solid #ffc107;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none !important;
}

.ccsu-legacy-btn:hover,
.ccsu-legacy-btn:focus {
    background-color: #072141 !important;
    color: #ffc107 !important;
    border-color: #072141;
    text-decoration: none !important;
    outline-offset: 2px;
}

/* =========================================
   FOOTER — logo, social icons, nav links
   ========================================= */

/* Social media icon links */
.ccsu-footer-social {
    color: #ffffff;
    opacity: 0.85;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.ccsu-footer-social:hover,
.ccsu-footer-social:focus {
    color: #ffc107 !important;   /* CCSU Gold on hover */
    opacity: 1;
    text-decoration: none !important;
}

/* Footer nav links (About, Privacy Policy) */
.ccsu-footer-link {
    opacity: 0.85;
    transition: opacity 0.2s ease, color 0.2s ease;
    text-decoration: none !important;
}

.ccsu-footer-link:hover,
.ccsu-footer-link:focus {
    color: #ffc107 !important;   /* CCSU Gold on hover */
    opacity: 1;
    text-decoration: none !important;
}

/* =========================================
   SERVICE CARDS INSIDE GUTENBERG GROUP BLOCK
   Used by [ccsu_service_cards] shortcode.
   The Group block provides the blue background; cards must be transparent
   so there's no double-blue box inside the band.
   ========================================= */
.wp-block-group .ccsu-service-card {
    background-color: transparent;
    padding: 1rem 1.5rem;
}