/*!
Theme Name: When and Where in Boston - 2024
Theme URI: https://whenandwhereinboston.org
Author: Stephen Simon Interactive
Author URI: https://stephensimon.com
Description:
Version: 1.0.1
Text Domain: wawib2024
*/

/* Bootstrap overrides */
body {
  font-family: Roboto, -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  padding-top: 62px;
}

.btn,
.form-control {
  border-radius: 0;
}

.btn {
  padding: .63rem .63rem;
}

/* Container */
@media (min-width: 1400px) {
  .container-xl {
    max-width: 1380px !important;
  }
}

@media (min-width: 1775px) {
  .home .container-xl {
    max-width: 1745px !important;
  }
}

.container-xl > .container-fluid {
  overflow: hidden;
}

/* Forms */
input[pattern]:invalid{
  color:red;
  border: red solid 3px;
}

::-webkit-input-placeholder {
  font-style: italic;
}
:-moz-placeholder {
  font-style: italic;
}
::-moz-placeholder {
  font-style: italic;
}
:-ms-input-placeholder {
  font-style: italic;
}

button:disabled {
  cursor: not-allowed;
}

.event-description {
  font-size: 1.2rem;
}

.col-form-label {
  display: flex;
  align-items: baseline;
}

.required-asterisk {
  color:red;
  font-size:1.2rem;
  margin-left: 5px;
}

/* Utilities */
.bg-wawib-primary {
  background-color: var(--wp--preset--color--wawib-primary) !important;
}

.border-wawib-primary {
  border-color: var(--wp--preset--color--wawib-primary) !important;
}

.btn-wawib-primary {
  background-color: var(--wp--preset--color--wawib-primary);
  border-color: var(--wp--preset--color--wawib-primary);
  color: #fff;
}

.btn-wawib-primary:hover,
.btn-wawib-primary:focus {
  color: rgba(255,255,255,.8);
}

.bg-wawib-secondary {
  background-color: var(--wp--preset--color--wawib-secondary) !important;
}

.border-wawib-secondary {
  border-color: var(--wp--preset--color--wawib-secondary) !important;
}

.btn-wawib-secondary {
  background-color: var(--wp--preset--color--wawib-secondary);
  border-color: var(--wp--preset--color--wawib-secondary);
  color: #fff;
}

.btn-wawib-secondary:hover,
.btn-wawib-secondary:focus {
  color: rgba(255,255,255,.8);
}

.bg-wawib-tertiary {
  background-color: var(--wp--preset--color--wawib-tertiary) !important;
}

.btn-wawib-tertiary {
  background-color: var(--wp--preset--color--wawib-tertiary);
  border-color: var(--wp--preset--color--wawib-tertiary);
}

/* Header */
.navbar.bg-dark {
  background-color: var(--wp--preset--color--wawib-primary) !important;
}

.navbar-dark .navbar-nav .nav-link {
  color: #fff;
}

.navbar-dark .navbar-nav .active>.nav-link, .navbar-dark .navbar-nav .nav-link.active, .navbar-dark .navbar-nav .nav-link.show, .navbar-dark .navbar-nav .show>.nav-link {
  color: var(--wp--preset--color--wawib-active);
}

@media (min-width: 992px) {
  .navbar-expand-md .navbar-nav .nav-link {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

/* Bootstrap multi-level navigation fix
@link https://joeybabcock.me/blog/html/bootstrap-multi-level-dropdown-menus-in-wordpress/ */
@media (min-width: 576px) {
  .dropdown-menu {
    width: 11rem;
  }
}
.navbar-expand-md .navbar-nav .dropdown-menu .dropdown-menu {
  left: -11rem;
  position: absolute;
  top: 0;
}
.dropdown-item {
  white-space: normal !important;
}
@media (max-width: 575px) {
  .navbar-expand-md .navbar-nav .dropdown-menu {
    background-color: transparent;
    border: none;
  }

  .navbar-expand-md .navbar-nav .dropdown-item {
    color: #fff;
  }

  .navbar-expand-md .navbar-nav .dropdown-item:focus,
  .navbar-expand-md .navbar-nav .dropdown-item:hover {
    background-color: transparent;
    color: var(--wp--preset--color--wawib-active);
  }

  .navbar-expand-md .navbar-nav .dropdown-menu .dropdown-menu {
    left: 0;
    margin-top: 0;
    padding-top: 0;
    position: relative;
    width: auto;
  }
  .dropdown-menu {
    padding: .5rem 0;
    margin: .125rem 0 0;
  }
  li > ul > li > ul > li > .dropdown-item {
    padding: .25rem 3rem;
  }
}

.logged-in .navbar.fixed-top {
  top: 32px;
}

/* Primary Content */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

.container-fluid.mt-3 > .wrapper {
  position: relative;
}

.content {
  width: 100%;
  transition: all 0.3s;
  flex: 1;    /* https://stackoverflow.com/questions/27240894/leaflet-map-in-a-flexbox-layout */
}

/* Sidebar */
.toggle-sidebar {
  display: block;
  position: relative;
  z-index: 100;
}

@media (min-width: 768px) {
  .toggle-sidebar {
    display: inline-block;
  }
}

@media (min-width: 768px) {
  .sr-only-md {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}

@media (min-width: 992px) {
  .sr-only-lg {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}

.sidebar {
  background: #fff;
  min-width: 276px;
  padding-top: 50px;
  position: absolute;
  transition: all 0.3s;
}

@media (min-width: 500px) and (max-width: 768px) {
  .sidebar {
    width: 100%;
  }
}

.sidebar .form  {
  background: #fff;
  position: relative;
  z-index: 30;
}

.sidebar.closed {
  margin-left: -200%;
}

@media (min-width: 768px) {
  .sidebar.closed {
    margin-left: -415px;
  }
  .sidebar {
    height: auto;
    min-width: 400px;
    max-width: 400px;
    padding-top: 29px;
    position: relative;
    transition: all 0.3s;
  }
}


/* https://www.makeuseof.com/disable-text-selection-cut-copy-paste-right-click-on-web-page/ */
.disable-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* view-detail component: size image to fit viewport in both detail and slideshow */
.view-detail img {
  max-height: calc(100vh - 126px);
}

.slideshow-view-detail img {
  max-height: calc(100vh - 180px);
}


/* event-list component */
td.event-link:hover {
  color: blue;
  cursor: pointer;
  text-decoration: underline;
}
.dropdown-item:disabled {
  cursor: not-allowed;
}

/* https://github.com/xcash/bootstrap-autocomplete/issues/8 */
.bootstrap-autocomplete.dropdown-menu{
  max-height: 230px;
  overflow-y: scroll;
}

/* Bootstrap-ify Pagination */
.nav-links {
  display: -ms-flexbox;
  display: flex;
  padding-left: 0;
  list-style: none;
  border-radius: .25rem;
}

.page-numbers {
  position: relative;
  display: block;
  padding: .5rem .75rem;
  margin-left: -1px;
  line-height: 1.25;
  color: #007bff;
  background-color: #fff;
  border: 1px solid #dee2e6;
}

a.page-numbers:hover {
  z-index: 2;
  color: #0056b3;
  text-decoration: none;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.page-numbers.current {
  color: #6c757d;
  pointer-events: none;
  cursor: auto;
  background-color: #fff;
  border-color: #dee2e6;
}

.page-numbers.dots {
  color: #6c757d;
  pointer-events: none;
  cursor: auto;
  background-color: #fff;
  border-color: #dee2e6;
}

.page-numbers:first-child {
  margin-left: 0;
  border-top-left-radius: .25rem;
  border-bottom-left-radius: .25rem;
}

.page-numbers:last-child {
  margin-right: 0;
  border-top-right-radius: .25rem;
  border-bottom-right-radius: .25rem;
}

/* Subject Modal */
.subject-list {
  list-style: none;
}
.subject-list:first-child {
  padding-left: 0;
}
.subject-list li {
  border-top: 1px solid #e2e2e2;
}
.category-has-children {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.collapse-btn {
  transition: all 300ms ease-in;
}
.collapse-btn:hover,
.collapse-btn:focus {
  opacity: 0.8;
  box-shadow: none;
  outline: none;
}

.collapse-btn[aria-expanded="true"]{
  transform: rotate(90deg);
}