/*
 * Styling for Jquery.selmodal.js's ".selModal" widget — the custom bottom-
 * sheet WllBase.js swaps in for the year `<select>` on mobile iOS Safari
 * only (see WllBase.js's setSelBox(): `$("html.mobile.ios:not(.mac) select")`
 * gate). The vendor plugin appends `.selModal` straight to `<body>`
 * (`$('body').append(modal_html)`), *outside* the `.wll-scope` wrapper
 * wll-list.css assumes everything lives under — so these rules stay in
 * their own unscoped stylesheet rather than polluting wll-list.css's "never
 * leaks outside .wll-scope" contract.
 *
 * The legacy WordPress theme shipped its own selmodal.css; this migration
 * never ported one, so the appended markup rendered as unstyled, visible
 * `<li>` text sitting after the real page content — reported as "year
 * selector options show up on bottom of footer" on iOS. This file supplies
 * the missing default-hidden state plus a proper bottom-sheet presentation;
 * it does not touch how/when Jquery.selmodal.js or WllBase.js run.
 */

.selModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

body.selModalBody {
  overflow: hidden;
}

.selModalOverlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.5);
  animation: selModalOverlayIn 0.2s ease both;
}

.selModalInner {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  max-height: min(70vh, 520px);
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.18);
  animation: selModalInnerIn 0.25s cubic-bezier(0.32, 0.72, 0, 1) both;
}

.selModalInner::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #d0d0d0;
  transform: translateX(-50%);
}

.selModalHeader {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  padding: 16px 16px 8px;
}

.selModalCloseIcon {
  display: flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f3f3f3;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.selModalCloseIcon:hover {
  background: #eeeff0;
}

.selModalCloseIcon span {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
}

.selModalCloseIcon span::before,
.selModalCloseIcon span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #383838;
}

.selModalCloseIcon span::before {
  transform: rotate(45deg);
}

.selModalCloseIcon span::after {
  transform: rotate(-45deg);
}

.selModalList {
  overflow-y: auto;
  flex: 1;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.selModalList ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.selModalList li {
  padding: 14px 24px;
  border-bottom: 1px solid #eeeff0;
  font-size: 15px;
  line-height: 24px;
  color: #383838;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.selModalList li:active {
  background: #f7f7f7;
}

.selModalList li.selected {
  color: #005ea5;
  font-weight: 700;
  background: #f7f7f7;
}

@keyframes selModalOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes selModalInnerIn {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
