/*!
Theme Name: Palomar Twenty Twenty-Two
Theme URI: http://www.palomar.edu/atrc/
Author: cnorcross, khelming
Author URI: https://www.palomar.edu/atrc/
Description: The official Palomar College WordPress theme.
Version: 1.16.4
Tested up to: 6.0
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: palomar-twentytwentytwo

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

Palomar Twenty Twenty-Two is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.
*/

@import './assets/css/app.css';

/* Bread Crumb custom styles */
.breadcrumb {
  padding-top: 0.5rem !important;
  /*padding-bottom:  1rem !important;*/
  padding-left: 0.5rem !important;
}

.trail-items li::after {
  content:  "" !important;
  padding: 0 0 0 0.5em !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
}

.breadcrumbs .trail-items {
  display:  flex !important;
}

/* A-Z Index */
#loading-icon-container {
  padding: 2rem;
}

/* Off Canvas Menu */
.current-menu-parent ul {
  display: block;
}

/* Blog page */
#content {
  padding: 0 3rem 6rem;
}

/* Cludo Autocomplete */
ul#search_autocomplete{
  margin-top: 1.5rem !important;
}
ul#search_autocomplete li{
  cursor: pointer !important;
}
ul#search_autocomplete li:hover{
  background-color: #ECEDEE !important;
}

/* Unified error styling across all forms */
.invalid-feedback {
  color: #b00020;        /* unify color */
  font-size: 0.875rem;   /* unify size */
  margin-top: 0.5rem;   /* spacing from input */
  margin-bottom: 0.5rem;   /* spacing from input */
}

/* Optional (keeps borders consistent with your palette) */
.form-control.is-invalid {
  border-color: #b00020;
  box-shadow: none;
}

#subsite-inline-search-input.is-invalid + .invalid-feedback {
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
Breadcrumbs (WCAG-safe) — label fixed, crumbs wrap in their own column
-------------------------------------------------------------------------- */

/* Never use pseudo-element separators (avoid 1.3.1 flags) */
.breadcrumb-item + .breadcrumb-item::before,
.trail-items li::after { content: none !important; }

/* Disable Bootstrap’s divider var — we render a real DOM separator */
.breadcrumb { --bs-breadcrumb-divider: ""; }

/* Use GRID: col 1 = label, col 2 = crumb list */
.breadcrumb-container {
  display: grid;
  grid-template-columns: max-content 1fr;  /* label width auto; crumbs take the rest */
  column-gap: .5rem;                       /* space between label and first crumb */
  align-items: start;
}

/* Label stays on a single line */
.you-are-here {
  font-weight: 600;
  white-space: nowrap;
  margin-right: 0;                         /* grid gap handles spacing */
}

/* Crumb list wraps naturally inside its column */
.breadcrumb-container .breadcrumb,
.breadcrumb-container .trail-items {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  background: transparent;
  white-space: normal;                     /* allow wrapping */
  overflow-wrap: anywhere;                 /* break long tokens/URLs */
  word-break: break-word;                  /* break long words */
  min-width: 0;                            /* flexbox shrink fix */
}

/* Items: allow shrink/wrap */
.breadcrumb-item,
.breadcrumb-item a {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Real DOM separator spacing/behavior */
.breadcrumb-separator,
.trail-items .sep,
.breadcrumb .sep {
  display: inline-flex !important;
  align-items: center;
  margin: 0 .4rem;
  line-height: 1;
  flex: 0 0 auto;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap;
}

/* Optional: a touch of emphasis on the label */
.you-are-here { font-weight: 600; margin-right: .25rem; }

#subsite-inline-search-input.is-invalid + .invalid-feedback {
  margin-top: 0.25rem;
  /* (optional) tighten on small screens */
  @media (max-width: 576px) 
  {
    .breadcrumb-container { column-gap: .4rem; }
    .breadcrumb-container .breadcrumb { gap: .2rem; }
  }
}

/* --------------------------------------------------------------------------
Subsite Menu: Accessible Dropdown Visibility Fix
-------------------------------------------------------------------------- */

/* Default state: all dropdowns hidden */
#subsite-menu .menu-item-has-children > ul.sub-menu {
  display: none !important;
}

/* Visible when parent is active (keyboard or mouse) */
#subsite-menu .menu-item-has-children.is-open > ul.sub-menu {
  display: block !important;
}

/* --------------------------------------------------------------------------
   Subsite menu caret rotation (driven by .is-open on the LI)
   -------------------------------------------------------------------------- */
#subsite-menu .menu-item-has-children > a .fa.right,
#subsite-menu .menu-item-has-children > a .fa-chevron-down {
  transition: transform 0.2s ease-in-out;
  transform: rotate(0deg);
}

#subsite-menu .menu-item-has-children.is-open > a .fa.right,
#subsite-menu .menu-item-has-children.is-open > a .fa-chevron-down {
  transform: rotate(180deg);
}