/* Advanced Finder & Load More UI — enqueued only for finder/archive contexts. */
/* v2.1 RC7: Advanced popup on the Recipe Archive and Elementor Recipe Finder. */
.wmrs-finder--advanced .wmrs-finder__filter-panel{display:flex;align-items:stretch;gap:10px;min-width:0}
.wmrs-finder--advanced .wmrs-finder__form{display:flex;flex:1 1 auto;min-width:0;gap:10px}
.wmrs-finder--advanced .wmrs-finder__form>.wmrs-search-field{flex:1 1 auto;min-width:0}
.wmrs-finder--advanced .wmrs-finder__form>.wmrs-editorial-sort{flex:0 0 185px;max-width:185px}
.wmrs-finder--advanced .wmrs-finder__form>input[type=hidden]{display:none}
.wmrs-finder--advanced .wmrs-mobile-filter-toggle,.wmrs-finder--advanced .wmrs-mobile-filter-bottom{display:none!important}
/* RC8: compact cards, scrollable choices, mobile accordion. Scoped to recipe widget. */
.wmrs .wmrs-popup__trigger{display:inline-flex!important;align-items:center;justify-content:center;gap:10px;flex:0 0 auto;border:1px solid #213963!important;background:#213963!important;color:white!important;font-size:13px!important;font-weight:750!important;border-radius:11px!important;padding:10px 17px!important;min-height:50px;height:auto;line-height:1.25;letter-spacing:normal;text-transform:none;box-shadow:none!important;cursor:pointer}
.wmrs .wmrs-popup__trigger:hover,.wmrs .wmrs-popup__trigger:focus-visible{background:#304e7a!important;border-color:#304e7a!important}
.wmrs .wmrs-popup__badge{display:inline-flex;align-items:center;justify-content:center;background:#fff;color:#213963;border-radius:50px;font-size:10px;min-width:20px;padding:2px 5px}
.wmrs .wmrs-popup__badge[hidden],.wmrs .wmrs-popup__group-count[hidden]{display:none!important}
body.wmrs-popup-open{overflow:hidden}
.wmrs .wmrs-popup[hidden]{display:none!important}
.wmrs .wmrs-popup{position:fixed;inset:0;z-index:2147482000;display:flex;align-items:center;justify-content:center;padding:20px;isolation:isolate;color:#182d47}
.wmrs .wmrs-popup__backdrop{position:absolute;inset:0;background:rgba(10,15,22,.72);z-index:-1}
.wmrs .wmrs-popup__dialog{--wmrs-popup-card-height:300px;position:relative;display:flex;flex-direction:column;width:100%;max-width:1060px;max-height:min(82dvh,720px);min-height:0;background:#f8f6f2;border:1px solid #e8e6e0;border-radius:18px;box-shadow:0 28px 80px rgba(0,0,0,.22);overflow:hidden}
.wmrs .wmrs-popup__header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex:none;padding:22px 28px 14px}
.wmrs .wmrs-popup__heading-wrap{display:flex;flex-direction:column;gap:4px}
.wmrs .wmrs-popup__header h2{margin:0;color:#213963;font-family:inherit;font-size:clamp(24px,2.8vw,31px);font-weight:780;letter-spacing:-.035em;line-height:1.15}
.wmrs .wmrs-popup__summary{margin:0;color:#818d93;font-size:12px;line-height:1.4}
.wmrs .wmrs-popup__close{display:grid;place-items:center;flex:0 0 34px;background:#fff!important;border:1px solid #e4e5e2!important;border-radius:9px!important;color:#263c5e!important;font-size:25px!important;line-height:1!important;padding:0!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;box-shadow:none!important}
.wmrs .wmrs-popup__close:hover{background:#eef0f4!important}
.wmrs .wmrs-popup__columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px;align-items:start;padding:6px 28px 24px;overflow-y:auto;overscroll-behavior:contain;flex:1 1 auto;min-height:0}
.wmrs .wmrs-popup__group{border:1px solid #e5e7e4;border-radius:13px;background:#fff;box-shadow:0 4px 18px rgba(28,46,50,.035);padding:0;margin:0;min-width:0;min-height:0;height:var(--wmrs-popup-card-height);max-height:100%;display:flex;flex-direction:column;gap:0;overflow:hidden}
.wmrs .wmrs-popup__group--empty{height:130px;max-height:130px}
.wmrs .wmrs-popup__group-head{flex:none;border-bottom:1px solid #edf0ed;background:#fdfdfb}
.wmrs .wmrs-popup__group-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:52px;gap:8px;padding:12px 14px!important;border:0!important;background:transparent!important;color:#213963!important;font-family:inherit;font-size:15px;font-weight:800;line-height:1.25;text-align:left;text-transform:none!important;letter-spacing:normal!important;box-shadow:none!important;cursor:pointer}
.wmrs .wmrs-popup__group-name{min-width:0;flex:1}
.wmrs .wmrs-popup__group-count{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:99px;background:#e7edfa;color:#213963;font-size:11px;font-weight:800;padding:0 6px}
.wmrs .wmrs-popup__chevron{color:#6a7985;font-size:17px;line-height:1;display:none;transition:transform .18s ease}
.wmrs .wmrs-popup__option-area{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;padding:8px 8px 9px}
.wmrs .wmrs-popup__options{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ced6d6 transparent;padding:1px 2px}
.wmrs .wmrs-popup__options::-webkit-scrollbar{width:6px}
.wmrs .wmrs-popup__options::-webkit-scrollbar-thumb{background:#cbd2d5;border-radius:99px}
.wmrs .wmrs-popup__option{display:flex;align-items:center;gap:9px;min-height:35px;width:100%;min-width:0;margin:0;padding:7px 9px;border-radius:8px;border:1px solid transparent;background:transparent;color:#33414b;cursor:pointer;font-size:13px;line-height:1.3;transition:background-color .15s ease}
.wmrs .wmrs-popup__option>span{overflow-wrap:anywhere;min-width:0}
.wmrs .wmrs-popup__option:hover{background:#f5f6f3}
.wmrs .wmrs-popup__option.is-selected:not(.wmrs-popup__option--all){background:#edf2f8;color:#213963;font-weight:650}
.wmrs .wmrs-popup__option input{appearance:none;-webkit-appearance:none;display:grid;place-items:center;flex:0 0 17px;width:17px;height:17px;min-width:17px;min-height:17px;margin:0!important;padding:0!important;background:white!important;border:1.5px solid #a6b2bd!important;border-radius:4px;box-shadow:none!important;cursor:pointer}
.wmrs .wmrs-popup__option input:checked{background:#213963!important;border-color:#213963!important}
.wmrs .wmrs-popup__option input:checked::after{content:'✓';color:#fff;font:700 12px/1 system-ui}
.wmrs .wmrs-popup__option input:focus-visible,.wmrs .wmrs-popup__group-toggle:focus-visible,.wmrs .wmrs-popup__close:focus-visible{outline:3px solid #96b9df;outline-offset:2px}
.wmrs .wmrs-popup__option--all{margin-bottom:5px;background:#f1f4f6;color:#4d6379;font-weight:700;flex:none}
.wmrs .wmrs-popup__empty{font-size:12px;color:#82909a;padding:8px;margin:0}
.wmrs .wmrs-popup__footer{flex:none;display:flex;justify-content:flex-end;gap:10px;align-items:center;padding:13px 28px;background:#f3e7dc;border-top:1px solid #eadfd4}
.wmrs .wmrs-popup__footer button{min-height:42px;border-radius:9px!important;font-weight:800!important;letter-spacing:.025em!important;text-transform:uppercase!important;font-size:12px!important;padding:10px 17px!important;box-shadow:none!important;white-space:nowrap;line-height:1.2}
.wmrs .wmrs-popup__reset{background:transparent!important;border:1px solid transparent!important;color:#566779!important}
.wmrs .wmrs-popup__reset:hover{background:#e9ded3!important}
.wmrs .wmrs-popup__apply{background:#213963!important;border:1px solid #213963!important;color:white!important;min-width:175px}
.wmrs .wmrs-popup__apply:hover{background:#2b4a79!important;color:white!important}
@media(max-width:920px){.wmrs .wmrs-popup__columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:8px 22px 20px}.wmrs .wmrs-popup__group{height:230px;max-height:none}.wmrs .wmrs-popup__dialog{max-height:88dvh}.wmrs .wmrs-popup__header{padding:19px 22px 13px}.wmrs .wmrs-popup__footer{padding:12px 22px}.wmrs-finder--advanced .wmrs-finder__form>.wmrs-editorial-sort{flex-basis:140px;max-width:140px}}
@media(max-width:767px){.wmrs-finder--advanced .wmrs-finder__filter-panel{flex-wrap:wrap}.wmrs-finder--advanced .wmrs-finder__form{flex-basis:100%;display:flex;flex-wrap:wrap}.wmrs-finder--advanced .wmrs-finder__form>.wmrs-search-field{flex-basis:100%;grid-column:auto}.wmrs-finder--advanced .wmrs-finder__form>.wmrs-editorial-sort{flex-basis:100%;max-width:none}.wmrs .wmrs-popup__trigger{width:100%;min-height:44px}.wmrs .wmrs-popup{padding:0;align-items:flex-end}.wmrs .wmrs-popup__dialog{max-width:none!important;max-height:94dvh;border-radius:18px 18px 0 0}.wmrs .wmrs-popup__columns{padding:6px 15px 16px}.wmrs .wmrs-popup__header{padding:17px 16px 13px}.wmrs .wmrs-popup__footer{position:sticky;bottom:0;gap:8px;padding:12px 15px}.wmrs .wmrs-popup__footer button{flex:1 1 0;min-width:0!important;padding:12px 8px!important}}
@media(max-width:650px){.wmrs .wmrs-popup__columns{display:flex;flex-direction:column;align-items:stretch;gap:9px;overflow-y:auto}.wmrs .wmrs-popup__group{height:auto;max-height:none;min-height:0;flex:none}.wmrs .wmrs-popup__group-toggle{min-height:48px}.wmrs .wmrs-popup__chevron{display:block}.wmrs .wmrs-popup__group.is-collapsed .wmrs-popup__option-area{display:none}.wmrs .wmrs-popup__group.is-collapsed .wmrs-popup__chevron{transform:rotate(-90deg)}.wmrs .wmrs-popup__option-area{flex:auto}.wmrs .wmrs-popup__options{max-height:185px;overflow-y:auto;flex:auto}.wmrs .wmrs-popup__header h2{font-size:25px}}
@media(prefers-reduced-motion:reduce){.wmrs .wmrs-popup,.wmrs .wmrs-popup *{transition:none!important}}


/* v2.1 RC13: lightweight, accessible Load More pagination. Scoped to the recipe finder. */
.wmrs .wmrs-load-more{display:flex;justify-content:center;margin:34px 0 0;width:100%;}
.wmrs .wmrs-load-more__button{display:inline-flex;align-items:center;justify-content:center;gap:13px;min-height:48px;padding:13px 26px;background:#173a30;border:1px solid #173a30;border-radius:999px;color:#fff;font-family:inherit;font-size:13px;font-weight:750;line-height:1.3;letter-spacing:.01em;text-transform:none;cursor:pointer;box-shadow:0 6px 18px rgba(22,50,40,.07);transition:background-color .2s,border-color .2s,transform .2s,box-shadow .2s;}
.wmrs .wmrs-load-more__button:hover:not(:disabled){background:#244b3d;border-color:#244b3d;color:#fff;transform:translateY(-2px);box-shadow:0 10px 22px rgba(22,50,40,.13);}
.wmrs .wmrs-load-more__button:focus-visible{outline:3px solid #a5c4a4;outline-offset:3px;}
.wmrs .wmrs-load-more__button:disabled{opacity:.75;cursor:progress;}
.wmrs .wmrs-load-more__arrow{font-size:17px;line-height:1;}
.wmrs .wmrs-load-more__button.is-loading .wmrs-load-more__arrow{width:15px;height:15px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;font-size:0;animation:wmrs-load-spin .8s linear infinite;}
@keyframes wmrs-load-spin{to{transform:rotate(360deg)}}
@media(max-width:767px){.wmrs .wmrs-load-more{margin-top:24px}.wmrs .wmrs-load-more__button{min-height:44px;width:min(100%,300px);padding:12px 20px;font-size:12px;}}
@media(prefers-reduced-motion:reduce){.wmrs .wmrs-load-more__button{transition:none}.wmrs .wmrs-load-more__button:hover:not(:disabled){transform:none}.wmrs .wmrs-load-more__button.is-loading .wmrs-load-more__arrow{animation:none}}


/* v2.1 RC14 — resilient Search / Sort / Popup trigger layout.
   Popup mode only: old Classic Finder and pagination markup remain untouched.
   Controls use variables to avoid the theme's input/button !important overrides. */
.wmrs-finder--advanced {
  --wmrs-toolbar-gap: 10px;
  --wmrs-toolbar-field-height: 52px;
  --wmrs-toolbar-sort-width: 190px;
  --wmrs-toolbar-filter-width: 210px;
  --wmrs-filter-input-bg: #f9faf8;
  --wmrs-filter-input-text: #22382f;
  --wmrs-filter-input-border: #e1e9df;
  --wmrs-filter-trigger-bg: #173a30;
  --wmrs-filter-trigger-color: #fff;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__filter-panel {
  display:flex; flex-direction:row; flex-wrap:nowrap; align-items:stretch;
  gap:var(--wmrs-toolbar-gap); min-width:0; max-width:100%;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__form {
  display:flex; flex:1 1 auto; flex-wrap:nowrap; align-items:stretch;
  min-width:0; width:auto; max-width:none; margin:0; gap:0;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__form > .wmrs-search-field {
  display:flex; flex:1 1 auto; align-items:center; grid-column:auto;
  min-width:0; max-width:100%; width:100%; min-height:var(--wmrs-toolbar-field-height);
  border:1px solid var(--wmrs-filter-input-border)!important;
  background:var(--wmrs-filter-input-bg)!important;
  border-radius:12px; box-shadow:none!important; overflow:hidden;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__form > .wmrs-search-field:focus-within,
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__sort:focus-within {
  border-color:var(--wmrs-primary,#173a30)!important;
  box-shadow:0 0 0 3px rgba(23,58,48,.10)!important;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__form .wmrs-search-field input {
  box-sizing:border-box; border:0!important; min-height:0!important;
  height:calc(var(--wmrs-toolbar-field-height) - 2px)!important;
  width:100%; min-width:0; margin:0!important;
  padding:0 16px 0 46px!important;
  background:transparent!important; color:var(--wmrs-filter-input-text)!important;
  box-shadow:none!important; outline:0!important; font-size:14px!important;
  line-height:1.4;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-search-field > span[aria-hidden] {
  left:15px; font-size:22px; line-height:1;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions {
  display:grid;
  grid-template-columns:minmax(0,var(--wmrs-toolbar-sort-width)) minmax(0,var(--wmrs-toolbar-filter-width));
  flex:0 0 auto; align-items:stretch; gap:var(--wmrs-toolbar-gap); min-width:0;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-finder__sort {
  display:flex; align-items:center; position:relative; min-width:0; max-width:none;
  min-height:var(--wmrs-toolbar-field-height);
  background:var(--wmrs-filter-input-bg)!important;
  border:1px solid var(--wmrs-filter-input-border)!important;
  border-radius:12px; box-shadow:none!important; overflow:hidden;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__sort::after {
  content:""; position:absolute; top:50%; right:17px; width:7px; height:7px;
  transform:translateY(-70%) rotate(45deg); border-right:1.6px solid #697e73;
  border-bottom:1.6px solid #697e73; pointer-events:none;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__sort select {
  display:block; appearance:none!important; -webkit-appearance:none!important;
  width:100%; min-width:0; height:calc(var(--wmrs-toolbar-field-height) - 2px)!important;
  min-height:0!important; max-height:none; margin:0!important;
  padding:0 33px 0 15px!important;
  background:transparent!important; border:0!important; border-radius:0!important;
  color:var(--wmrs-filter-input-text)!important;
  box-shadow:none!important; outline:0!important;
  font-size:14px!important; line-height:1.35; cursor:pointer;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-popup__trigger {
  display:inline-flex!important; align-items:center; justify-content:center;
  width:100%; min-width:0; max-width:100%;
  min-height:var(--wmrs-toolbar-field-height)!important;
  height:var(--wmrs-toolbar-field-height)!important;
  margin:0!important; padding:9px 15px!important;
  border-radius:12px!important;
  background:var(--wmrs-filter-trigger-bg)!important;
  border-color:var(--wmrs-filter-trigger-bg)!important;
  color:var(--wmrs-filter-trigger-color)!important;
  white-space:nowrap; font-size:13px!important; line-height:1.3!important;
  font-weight:700!important; letter-spacing:normal!important;
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-popup__trigger:hover {
  filter:brightness(1.12);
}
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-popup__trigger > span:first-child {
  font-size:16px; line-height:1; font-weight:400;
}
/* At narrower widths the search takes the first row; equal-width actions share the next. */
@media (max-width:900px) {
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__filter-panel {
    flex-direction:column; gap:9px;
  }
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__form {
    display:flex; flex:0 0 auto; width:100%; max-width:100%;
  }
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%; max-width:100%; gap:9px;
  }
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-popup__trigger { width:100%; }
}
@media (max-width:767px) {
  :where(.wmrs.wmrs-finder.wmrs-finder--advanced) { --wmrs-toolbar-field-height:46px; }
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__filter-panel {padding:9px; gap:8px;}
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions {gap:8px;}
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__form > .wmrs-search-field {
    min-height:var(--wmrs-toolbar-field-height); border-radius:11px;
  }
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-finder__sort {border-radius:11px;}
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-popup__trigger {
    min-height:var(--wmrs-toolbar-field-height)!important;
    height:var(--wmrs-toolbar-field-height)!important;
    border-radius:11px!important; padding:8px 10px!important;
    font-size:12px!important; gap:6px;
  }
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__sort select {
    padding-left:11px!important; padding-right:27px!important; font-size:12px!important;
  }
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__sort::after {right:12px;}
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__form .wmrs-search-field input {
    padding-left:42px!important; font-size:13px!important;
  }
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-search-field > span[aria-hidden] {
    left:13px; font-size:19px;
  }
}
@media(max-width:370px) {
  .wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-popup__trigger {
    font-size:11px!important;
  }
}

/* RC14: crisp inline SVG icons remain aligned independently of theme icon-font styles. */
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-search-field > span[aria-hidden] { display:flex;align-items:center;justify-content:center;width:20px;height:20px; }
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-search-field > span[aria-hidden] svg { display:block;width:19px;height:19px;fill:none;stroke:currentColor; }
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-popup__trigger > span:first-child { display:inline-flex;align-items:center;justify-content:center;flex:none; }
.wmrs.wmrs-finder.wmrs-finder--advanced .wmrs-finder__actions > .wmrs-popup__trigger > span:first-child svg { display:block;width:16px;height:16px;fill:none;stroke:currentColor; }

/* RC5: accessible request-error recovery, scoped to the Recipe Finder. */
.wmrs .wmrs-search-error__detail{display:inline-block;margin-inline:8px;font-size:.85em;font-weight:650;}
.wmrs .wmrs-search-error__detail[hidden]{display:none;}
.wmrs .wmrs-search-error__retry{margin-inline-start:12px;padding:7px 13px;min-height:36px;background:transparent;border:1px solid currentColor;border-radius:8px;color:inherit;font:inherit;font-size:.86em;font-weight:700;cursor:pointer;}
.wmrs .wmrs-search-error__retry:hover{background:rgba(164,59,32,.07);color:inherit;}
.wmrs .wmrs-search-error__retry:focus-visible{outline:2px solid currentColor;outline-offset:3px;}
@media(max-width:480px){.wmrs .wmrs-search-error__retry{margin-top:8px;margin-inline-start:0;display:inline-block;}}
