/* Prevent page scrolling when modal is open */
body.jlw-search-modal-open {
  overflow: hidden;


  --a: #332fa5 ;
}

/* Fix for p tag wrapping the launch button */
.is-vertically-aligned-center p {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.search-launch-btn {
  display: inline-grid !important;
}

/* Mobile-First: Overlay - Full screen background */
.jlw-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999999;
}

.jlw-search-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Mobile-First: Modal - Full screen on mobile */
.jlw-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  touch-action: pan-y;
}

/* Header layout - flex for h1 and close button */
.jlw-search-modal > .wp-block-group {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  position: relative !important;
}

/* Override WordPress sticky positioning inside modal */
.jlw-search-modal .sticky {
  position: relative !important;
}

.close-btn {
  background: none;
  border: none;
  font-size: 30px;
  color: #ffffff !important;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

/* Scrollable Content */
.jlw-modal-content {
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0;
  position: relative;
  background: white;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Content Panels */
.content-panel {
  display: none;
}

.content-panel.active {
  display: flex !important;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  flex: 1;
  overflow: hidden !important;
}

/* Form inside panel takes full height */
.content-panel form {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

/* DEPRECATED - UI restructure */
/*
.jlw-modal-footer {
  border-top: 1px solid #ddd;
  background: #f9f9f9;
padding: .42em;
}
*/

/* Desktop Overrides */
@media (min-width: 769px) {
  .jlw-search-overlay.active {
    align-items: center;
    justify-content: center;
  }

  .jlw-search-modal {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 90%;
    max-width: 800px;
    height: 90vh;
    max-height: 800px;
    /* border: 1px solid #ccc; */
    border-radius: 0.24em;
    box-shadow: 0 .24em 20px rgba(0,0,0,0.15);
  }
}

/* Phase 5: Search Form Styles */

/* Search Group */
.search-group {
  margin-bottom: .42em;
  flex-shrink: 0;
  margin-top: .6em;
}

.search-group label {
  display: none;
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 1em;
  opacity: 0;
}

.search-group input {
  width: 100%;
  padding: .742em;
  font-size: 1em;
  border: 1px solid #ddd;
  border-radius: .24em;
  box-sizing: border-box;

}

.search-group input:focus {
  outline: none;
}

/* Filter Group */
.filter-group {
  margin-bottom: 20px;
}

.filter-group h3 {
  margin: 0 0 .66em 0;
  font-size: 1em;
  font-weight: bold;
}

.filter-input-group {
  display: grid;
  grid-template-columns: 1fr 2em 2em;
  gap: 3px;
  align-items: center;
  margin-bottom: 12px;
  padding-right: .46em;
}

.filter-input-group label {
  font-size: 1em;
  font-weight: 600;
  grid-column: 1 / 4;
  grid-row: 1;
}

.filter-input-group .selected-items {
  grid-column: 1;
  grid-row: 2;
}

.filter-input-group .filter-btn {
  grid-column: 2;
  grid-row: 2;
}

.filter-input-group .filter-clear-btn {
  grid-column: 3;
  grid-row: 2;
}

.selected-items {
  padding: 0.24em 0.66em;
  background: #f5f5f5;
  border: 1px solid rgba(242,242,242,.88);
  border-radius: 0.24em;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1em;
  line-height: 1.8;
}

.filter-btn,
.filter-clear-btn {
  padding: .42em;
  border: 1px solid rgba(242,242,242,.88);
  border-radius: 0.24em;
  background: white;
  cursor: pointer;
  color: #666;
  /* width: 36px;
  height: 36px; */
  display: block;
}

.filter-btn:hover,
.filter-clear-btn:hover {
  background: #f0f0f0;
}

/* CLAUDE bookmark 0022-category-styles */
/* Category Group */
.category-group {
  margin: 0;
  padding: 0;
}

.category-group h3 {
  margin: 0 0 0.75em 0;
  font-size: 1em;
  font-weight: 600;
  color: #333;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.24em 0.75em;
  /* background: #f9f9f9;
  border: 1px solid #ddd; */
  /* border-radius: .24em; */
  transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-item:hover {
  background: #f0f0f0;
  border-color: #999;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.checkbox-item label {
  margin: 0;
  font-size: 1em;
  cursor: pointer;
  flex: 1;
  user-select: none;
}

/* Checkbox group is stacked vertically */

/* Active state when checked */
/* .checkbox-item:has(input:checked) {
  background: #e8f4f8;
  border-color: #0073aa;
} */

/* Phase 6: List Display Styles */

/* Screen Reader Only (hides visually but keeps for accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Filter List */
.filter-list {
  display: flex;
  flex-direction: column;
  margin-top: 1em;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.filter-item {
  display: flex;
  align-items: center;
  padding: .66em;
  cursor: pointer;
  transition: background-color 0.2s;
}

.filter-item:nth-child(odd) {
  background: #f8f8f8;
}

.filter-item:hover {
  background: #f0f0f0;
}

.filter-item input[type="checkbox"] {
  margin: 0 .66em 0 0;
  cursor: pointer;
  width: 1em;
  height: 1em;
}

.filter-item label {
  flex: 1;
  font-size: 1em;
  cursor: pointer;
}

/* Results Container */
.results-container {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Results List */
.results-list {
  color: #000;
  position: relative;
  width: 100%;
  padding-top: .42em;
  overflow: hidden auto;
  min-height: 0;
}

/* Unified search footer */
.jlw-search-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5em;
  padding: .24em;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
}

.jlw-search-footer .btn-primary,
.jlw-search-footer .btn-secondary {
  padding: .42em 1em;
  font-size: .88em;
}

.jlw-search-footer .pagination-controls {
  flex: 1;
  justify-content: center;
}

.result-item {
  display: block;
  padding: .66em;
  color: #000;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s;
}

.result-item:nth-child(odd) {
  background: #f8f8f8;
}

.result-item:hover {
  background: #f0f0f0;
}

.result-title {
  margin: 0;
  color: #000;
  font-size: 1em;
  font-weight: normal;
}

.result-meta {
  line-height: 1.4;
  color: #000;
}

.meta-item {
  display: block;
  color: #000;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
}

.page-info {
  font-size: 1em;
  color: #666;
  white-space: nowrap;
  min-width: 6.42em;
  display: inline-block;
  text-align: center;
}

/* Button Styles */
.btn-primary,
.btn-secondary,
.btn-pagination {
  padding: .42em 1em;
  border: none;
  border-radius: .24em;
  cursor: pointer;
  font-size: .88em;
  transition: background-color 0.2s;
  min-width: 6em !important;
  outline: none !important;
}

.jlw-search-modal *:focus,
.jlw-search-modal *:focus-visible,
.jlw-search-modal *:focus-within {
  outline: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: #444;
  color: white;
}

.btn-primary:hover {
  background: #222;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd; 
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-pagination{
  border: none;
  background-color: transparent;
  min-width: 1.42em !important;
  color: #333;
  padding: 0;
  font-weight: 600 !important;
}

/* State Displays */
.loading-state,
.empty-state,
.error-state,
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.loading-state p,
.empty-state p,
.error-state p {
  font-size: 1em;
  margin: 0;
}

.error-state p {
  color: #d63638;
}

/* Phase 7: Spinner Animation */
.spinner {
  border: .24em solid #f3f3f3;
  border-top: .24em solid #444;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* DEPRECATED - UI restructure */
/*
#jlw-search-1-footer-controls,
#jlw-search-2-footer-controls,
#jlw-search-3-footer-controls,
[id$='-footer-controls'] {
  display: flex;
  gap: .66em;
  justify-content: flex-end;
  justify-content: center;
  flex-wrap: wrap;
}
*/

/* Mobile adjustments */
@media (max-width: 768px) {
  .result-title {
    font-size: 1em;
  }
}

/* Search input with button */
.search-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-input-wrapper input {
  flex: 1;
  padding-block: .42em;
}

.search-input-btn {
  padding: .66em;
  min-width: 3.6em !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Filter action buttons (Load, Save, Clear) */
.filter-actions {
  display: flex;
  gap: .66em;
  margin-top: 0;
  border-top: 1px solid #f0f0f0;
  padding-top: .24em !important;
}

/* Main search button */
.search-action {
  margin-top: 12px;
}

.btn-search-main {
  border: 1px solid #333;
  margin-left: auto;
}

/* Preset modals (Save/Load) */
.jlw-preset-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000000; /* Higher than search modal */
  display: flex;
  align-items: center;
  justify-content: center;
}

.jlw-preset-modal-content {
  background: white;
  border-radius: 0;
  padding: 2.24em;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 .24em 20px rgba(0,0,0,0.2);
}

.jlw-preset-modal-content h3 {
  margin: 0 0 1em 0;
  font-size: 1em;
  font-weight: 600;
  color: #333;
}

.preset-name-input {
  width: 100%;
  padding: .66em;
  font-size: 1em;
  border: 1px solid #ddd;
  border-radius: .24em;
  box-sizing: border-box;
  margin-bottom: 1em;
}

.preset-name-input:focus {
  outline: none;
}

.jlw-preset-modal-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Presets list */
.presets-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1em;
  border: 1px solid #ddd;
  border-radius: .24em;
  background: white;
  color: #333;
}


/* Filter panel - scrollable container for filter lists */
.filter-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Filter panel action buttons - fixed at bottom */
.filter-panel-actions {
  display: flex;
  gap: 0.5em;
  justify-content: flex-end;
  padding: 0.66em;
  background: #f9f9f9;
  background: transparent;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
}

/* Filter controls - full width and sticky positioning */
.filter-controls {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
  padding: .24em .42em .24em;
  box-shadow: 0 2px .24em rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.filter-search-group {
  width: 100%;
}

.filter-search-group input {
  width: 100%;
  box-sizing: border-box;
}

.slider-container {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 3em;
  align-items: center;
  gap: .42em;
  margin-bottom: 0em;
}

.alpha-slider {
  flex: 1;
  display: block;
}

.slider-value {
  min-width: 30px;
  text-align: center;
  display: block;
  font-weight: 400;
  font-size: 132%;
}

/* Phase 5: Preset Panel Styles - Panel-based preset loader */
.presets-panel {
  padding: 0;
}

.presets-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1em;
  border: none;
}

.preset-item {
  display: flex;
  align-items: center;
  padding: .66em;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: .24em;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-inline: .42em;
  justify-content: space-between;
}

.preset-item:hover {
  background: #f0f0f0;
}

.preset-info {
  flex: 1;
}

.preset-name {
  font-size: 1em;
}

.preset-date {
  font-size: 0.85em;
  color: #666;
}

.btn-delete-preset {
  padding: .24em;
  border: none;
  background: transparent !important;
  color: currentColor;
  cursor: pointer;
  display: flex;
  align-items: center;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.btn-delete-preset:hover {
  opacity: 0.8;
}


@media (min-width: 769px) {
  .filter-input-group {
    grid-template-columns: 100px 1fr 2em 2em;
    padding-right: .24em;
  }

  .filter-input-group label {
    grid-column: 1;
    grid-row: 1;
  }

  .filter-input-group .selected-items {
    grid-column: 2;
    grid-row: 1;
  }

  .filter-input-group .filter-btn {
    grid-column: 3;
    grid-row: 1;
  }

  .filter-input-group .filter-clear-btn {
    grid-column: 4;
    grid-row: 1;
  }

  .result-title a {
    font-size: .88em !important;
  }

  .jlw-preset-modal-content {
    border-radius: 8px;
  }
}

/* === View Toggle & Advanced View Styles === */

/* Desktop: Fixed top position for both modes - advanced expands downward */
@media (min-width: 769px) {
  .jlw-search-modal {
    align-self: flex-start;
    margin-top: calc(50vh - 400px); /* Top position as if 800px modal were centered */
  }

  .jlw-search-modal.basic-mode {
    height: auto;
  }

  .jlw-search-modal.advanced-mode {
    height: 60vh;
    bottom: auto !important;
    overflow: hidden;
  }
}

/* Mobile: Basic mode compact and centered */
@media (max-width: 768px) {
  .jlw-search-modal.basic-mode {
    top: 20%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    width: 90%;
    height: auto;
    max-height: 80vh;
  }
}

/* View Toggle */
.search-view {
  display: none;
}

.search-view.active {
  display: block;
}

/* Advanced view needs flex when active */
.advanced-view.active {
  display: flex !important;
  height: 100% !important;
}

/* Basic view keeps search input styling */
.basic-view {
  flex-shrink: 0;
}

.basic-view .search-group {
  margin-bottom: 1em;
}

/* Controls row - always visible */
.search-controls-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  position: relative; /* For help popup positioning */
}

/* Restyle advanced toggle button */
.btn-advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  width: auto;
  padding: 0.5em 0;
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1em;
  text-align: left;
  outline: none; /* Remove focus ring */
  margin-left: auto;
  margin-right: .42em;
}

.btn-advanced-toggle:focus {
  outline: none;
}

.btn-advanced-toggle:hover {
  color: #333;
}

/* Arrow icon rotation */
.btn-advanced-toggle .toggle-arrow {
  transition: transform 0.12s ease;
  transform: rotate(-90deg);
}

.btn-advanced-toggle.expanded .toggle-arrow {
  transform: rotate(0);
}

/* Icon buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 0.24em;
  color: #666;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-icon:hover {
  background: #f0f0f0;
  border-color: #999;
  color: #333;
}

/* Help button wrapper for popup positioning */
.help-button-wrapper {
  position: relative;
}

/* Help popup */
.help-popup {
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 100;
  width: 300px;
  max-width: 90vw;
  margin-bottom: 0.5em;
  background: white;
  border: 1px solid #ddd;
  border-radius: 0.24em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.help-popup-content {
  padding: 1em;
}

.help-text {
  margin: 0 0 0.75em 0;
  font-size: 0.842em;
  line-height: 1.5;
  color: #555;
}

.help-text:last-child {
  margin-bottom: 0;
}

/* Search details panel - spans both columns */
.search-details-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
}

.search-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .24em 0;
}

.search-details-header .section-heading {
  margin: 0;
}

.search-details-content {
  flex: 1;
  min-height: 0;
  padding: 0.5em 0.66em;
  border-radius: 0.24em;
  overflow-y: auto;
  display: grid !important;
  grid-auto-rows: max-content;
  align-content: start;
}

.search-details-content p {
  margin: 0 0 1em 0 !important;
  font-size: 0.842em;
  line-height: 1.4;
  color: #333;
  flex: 0 0 auto;
}

.search-details-content p:nth-child(2) {
  padding-left: 1em !important;
}

.search-details-content p:last-child {
  margin-bottom: 0 !important;
}

.search-details-content .indented {
  padding-left: 1em;
}

.search-details-content .empty-selection {
  color: #999;
}

.search-details-header .section-heading{
  width: 72%;
}

/* Search button cell */
.search-button-cell {
  grid-column: 2;
  grid-row: 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.24em;
  padding-top: 0;
}

/* Advanced View Layout */
.advanced-view {
  padding-top: 0.5em;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.advanced-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: .42em;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Grid cell base styling */
.advanced-panels .grid-cell {
  min-width: 0; /* Prevent grid blowout */
xpadding: .24em;
}

/* Row 1: Category and Taxonomy groups - auto height */
.advanced-panels .category-group {
  grid-column: 1;
  grid-row: 1;
}

.advanced-panels .taxonomy-radio-group {
  grid-column: 2;
  grid-row: 1;
}


.search-details-panel, .category-group, .taxonomy-radio-group, .search-controls-row{
  padding-inline: .88em;
}

.search-input-wrapper{
  padding-inline: .24em;
}

/* DEPRECATED - UI restructure */
/*
.advanced-panels .instructions-wrapper {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.advanced-panels .instructions-wrapper .instructions-panel {
  flex: 1;
  border-radius: .24em;
}
*/

/* DEPRECATED - UI restructure */
/*
.advanced-panels .selection-display {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
*/

/* Row 3: Action buttons - spans both columns */
.advanced-panels .filter-actions {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: start;
  display: flex;
  gap: 0.25em;
  align-items: center;
  padding-top: 0;
}

.btn-help {
  min-width: auto !important;
}

/* DEPRECATED - UI restructure */
/*
.advanced-panels .edit-selection-cell {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
*/

.filter-actions, .edit-selection-cell{
  padding: .24em;
  padding-top: 0;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .advanced-panels {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto; /* 5 rows for stacked layout */
    gap: 1em;
  }

  .advanced-panels .category-group { grid-column: 1; grid-row: 1; }
  .advanced-panels .taxonomy-radio-group { grid-column: 1; grid-row: 2; }
  .advanced-panels .search-details-panel { grid-column: 1; grid-row: 3; }
  .advanced-panels .filter-actions { grid-column: 1; grid-row: 4; }
  .advanced-panels .search-button-cell { grid-column: 1; grid-row: 5; justify-content: flex-start; }
}

/* Instructions panel */
.instructions-panel {
  padding: 0.66em;
  background: #f0f7fb;
  border-left: 3px solid #0073aa;
  color: #555;
  line-height: 1.5;
}

.instruction-text {
  margin: 0 0 1em 0;
  font-size: .842em !important;
}

.instruction-text:last-child {
  margin-bottom: 0;
}

.instructions-gap {
  height: 0.5em;
  margin: 0;
}


/* Taxonomy Radio Group */
.taxonomy-radio-group {
  margin-top: 0;
  margin-bottom: 1.5em;
}

/* Consistent section headings */
.section-heading {
  margin: 0 0 0.42em 0;
  font-size: 1em;
  font-weight: 400;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: .36em;
}


.taxonomy-radio-group h3 {
  margin: 0 0 0.75em 0;
  font-size: 1em;
  font-weight: 600;
  color: #333;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.24em 0.75em;
  margin-bottom: 0.5em;
  /* background: #f9f9f9;
  border: 1px solid #ddd; */
  border-radius: .24em;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.radio-item:hover {
  background: #f0f0f0;
  border-color: #999;
}

.radio-item input[type="radio"] {
  margin: 0;
  cursor: pointer;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.radio-item label {
  margin: 0;
  font-size: 1em;
  cursor: pointer;
  flex: 1;
  user-select: none;
}

/* Selected radio state */
.radio-item:has(input:checked) {
  background: #e8f4f8;
  border-color: #0073aa;
}

/* Selection Display (Right Panel) */
.selection-display h3 {
  margin: 0 0 0.75em 0;
  font-size: 1em;
  font-weight: 600;
  color: #333;
}

.selection-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.66em;
  background: #fcfcfc;
  border-radius: .24em;
}

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

.selection-list li {
  padding: 0.25em 0;
  font-size: .842em;
  color: #333;
  cursor: pointer;
}

.empty-selection {
  color: #999;
  font-size: .842em;
  margin: 0;
}

/* DEPRECATED - UI restructure */
/*
.jlw-modal-footer [id$='-footer-controls'] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
}

.btn-basic-toggle {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1em;
  padding: 0.5em 1em;
}

.btn-basic-toggle:hover {
  color: #333;
  text-decoration: underline;
}

.jlw-search-modal.basic-mode .jlw-modal-footer {
  display: none;
}
*/