/* jpmascot 1.0.2 — homepage mascot, banner, FAQ and search mascot */
.jpmascot{--jpm-color:#2fb5d2;--jpm-pink:#c4007a;--jpm-ink:#414141;--jpm-teal:#1b6f80;font-family:"Open Sans",sans-serif;color:var(--jpm-ink)}
.jpmascot-banner-row,.jpmascot-home-row{
  display:flex;align-items:flex-end;justify-content:flex-start;
  gap:8px 20px;flex-wrap:wrap;margin-bottom:1.5rem;overflow:visible;
}
.jpmascot-banner-row .banner{margin-bottom:0;flex:0 1 auto;max-width:100%}
.jpmascot-banner-row .banner img{display:block;max-height:317px;width:auto;height:auto;max-width:100%}
.jpmascot-aside{display:flex;align-items:center;gap:14px;flex:1 1 260px;min-width:220px;padding-bottom:8px;overflow:visible}
.jpmascot-figure{position:relative;flex:0 0 auto;width:210px;max-width:42vw;overflow:visible;transform-origin:50% 88%}
.jpmascot-is-wave .jpmascot-figure{animation:jpmascot-sway 2s ease-in-out infinite}
.jpmascot-banner .jpmascot-figure{width:150px;max-width:28vw}
.jpmascot-figure img,.jpmascot-figure picture{display:block;width:100%;height:auto;filter:drop-shadow(0 3px 6px rgba(0,0,0,.12))}
@keyframes jpmascot-sway{
  0%,100%{transform:rotate(0deg)}
  25%{transform:rotate(-6deg)}
  50%{transform:rotate(4deg)}
  75%{transform:rotate(-4deg)}
}
@media (prefers-reduced-motion:reduce){
  .jpmascot-is-wave .jpmascot-figure{animation:none}
}
.jpmascot-bubble{
  position:relative;background:#fff;color:var(--jpm-ink);
  border:2px solid var(--jpm-color);border-radius:18px;padding:14px 18px;
  max-width:280px;font-size:16px;line-height:1.35;box-shadow:1px 1px 7px rgba(0,0,0,.12);
  margin:0;box-sizing:border-box;
}
.jpmascot-bubble strong{color:var(--jpm-pink);font-weight:700}
.jpmascot-bubble::before{
  content:"";position:absolute;left:-12px;top:36px;
  border-style:solid;border-width:10px 12px 10px 0;
  border-color:transparent var(--jpm-color) transparent transparent;
}
.jpmascot-bubble::after{
  content:"";position:absolute;left:-9px;top:38px;
  border-style:solid;border-width:8px 10px 8px 0;
  border-color:transparent #fff transparent transparent;
}

.jpmascot-banner{
  display:flex;align-items:center;gap:24px;background:#fff;border-radius:6px;
  margin:0 0 1.5rem;padding:22px 28px;box-shadow:1px 1px 7px rgba(0,0,0,.1);
  border-top:4px solid var(--jpm-color);overflow:hidden;position:relative;
}
.jpmascot-banner::after{
  content:"";position:absolute;right:0;top:0;bottom:0;width:8px;
  background:linear-gradient(to bottom,#0098d8 0 25%,#c4007a 25% 50%,#fcec00 50% 75%,#111 75% 100%);
}
.jpmascot-banner-copy{flex:1 1 auto;min-width:0}
.jpmascot-banner-copy h2{margin:0 0 8px;font-size:1.5rem;font-weight:700;color:var(--jpm-ink);line-height:1.25;text-transform:none}
.jpmascot-banner-copy p{margin:0 0 14px;color:var(--jpm-ink);font-size:16px;line-height:1.45}
.jpmascot-banner-copy .jpmascot-meta{color:var(--jpm-teal);font-weight:600}
.jpmascot-cta{
  display:inline-block;background:var(--jpm-color);color:#fff !important;
  font:700 14px/1.2 "Open Sans",sans-serif;text-transform:uppercase;letter-spacing:.3px;
  padding:10px 18px;border-radius:2px;text-decoration:none !important;border:0;
}
.jpmascot-cta:hover,.jpmascot-cta:focus{filter:brightness(.9);color:#fff !important;outline:2px solid var(--jpm-color);outline-offset:2px}

.jpmascot-faq{background:#fff;border-radius:6px;margin:0 0 1.5rem;padding:28px 28px 18px;box-shadow:1px 1px 7px rgba(0,0,0,.1)}
.jpmascot-faq h2{margin:0 0 6px;font-size:1.35rem;font-weight:700;color:var(--jpm-teal);text-transform:none}
.jpmascot-faq-lead{margin:0 0 18px;font-size:15px}
.jpmascot-faq details{border-top:1px solid #e3f5f9;padding:0}
.jpmascot-faq details:first-of-type{border-top:0}
.jpmascot-faq summary{
  cursor:pointer;list-style:none;padding:14px 8px 14px 0;font-weight:700;font-size:16px;
  color:var(--jpm-ink);display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.jpmascot-faq summary::-webkit-details-marker{display:none}
.jpmascot-faq summary::after{
  content:"+";flex:0 0 auto;width:26px;height:26px;border:2px solid var(--jpm-color);color:var(--jpm-color);
  border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700;line-height:1;
}
.jpmascot-faq details[open] summary::after{content:"–"}
.jpmascot-faq details[open] summary{color:var(--jpm-pink)}
.jpmascot-faq-a{padding:0 8px 16px 0;font-size:15px;line-height:1.55}
.jpmascot-faq-a p{margin:0 0 10px}
.jpmascot-faq-a p:last-child{margin-bottom:0}
.jpmascot-faq-a a{color:var(--jpm-pink);font-weight:700;text-decoration:underline}
.jpmascot-faq-a ul{margin:8px 0 10px 1.1em;padding:0}
.jpmascot-note{margin-top:8px;font-size:13px;color:#6b7280;font-style:italic}

/* Floating corner */
.jpmascot-float{
  position:fixed;bottom:16px;z-index:9990;display:flex;align-items:flex-end;gap:10px;
  max-width:min(360px, calc(100vw - 24px));pointer-events:none;
}
.jpmascot-float > *{pointer-events:auto}
.jpmascot-float-right{right:16px;flex-direction:row-reverse}
.jpmascot-float-left{left:16px}
.jpmascot-float .jpmascot-figure{width:110px;max-width:28vw}
.jpmascot-float .jpmascot-bubble{max-width:220px;font-size:14px;padding:10px 12px}
.jpmascot-float-right .jpmascot-bubble::before{
  left:auto;right:-12px;border-width:10px 0 10px 12px;
  border-color:transparent transparent transparent var(--jpm-color);
}
.jpmascot-float-right .jpmascot-bubble::after{
  left:auto;right:-9px;border-width:8px 0 8px 10px;
  border-color:transparent transparent transparent #fff;
}

@media (max-width:767px){
  .jpmascot-hide-mobile{display:none !important}
  .jpmascot-banner-row,.jpmascot-home-row{flex-direction:column;align-items:center;text-align:center;margin-bottom:1.25rem}
  .jpmascot-aside{flex-direction:column;align-items:center;min-width:0;width:100%;padding:0 8px 4px}
  .jpmascot-figure{width:150px;max-width:48vw}
  .jpmascot-bubble{max-width:100%}
  .jpmascot-bubble::before{
    left:50%;top:-12px;margin-left:-10px;
    border-width:0 10px 12px 10px;border-color:transparent transparent var(--jpm-color) transparent;
  }
  .jpmascot-bubble::after{
    left:50%;top:-9px;margin-left:-8px;
    border-width:0 8px 10px 8px;border-color:transparent transparent #fff transparent;
  }
  .jpmascot-banner{flex-direction:column;text-align:center;padding:18px 16px 20px;gap:10px}
  .jpmascot-banner::after{display:none}
  .jpmascot-banner .jpmascot-figure{width:120px;max-width:40vw}
  .jpmascot-banner-copy h2{font-size:1.2rem}
  .jpmascot-faq{padding:20px 16px 12px}
  .jpmascot-faq summary{font-size:15px;text-align:left}
  .jpmascot-float{bottom:12px}
  .jpmascot-float-right{right:12px}
  .jpmascot-float-left{left:12px}
}

/* Admin FAQ editor */
.jpmascot-admin-faq{margin-top:16px;background:#fff;border:1px solid #dbe3e8;padding:16px 20px 20px}
.jpmascot-admin-faq h3{margin:0 0 12px}
.jpmascot-admin-item{border:1px solid #e5e7eb;border-radius:4px;padding:12px;margin:0 0 12px;background:#fafafa}
.jpmascot-admin-item h4{margin:0 0 8px;font-size:13px}
.jpmascot-admin-item label{display:block;font-weight:600;margin:6px 0 2px}
.jpmascot-admin-item input[type=text],.jpmascot-admin-item textarea{width:100%;max-width:100%;box-sizing:border-box}
.jpmascot-admin-item textarea{min-height:80px}

/* Search-block mascot (injected into .compatfinder-visual or a configured selector) */
.jpmascot-search{
  position:absolute;inset:0;z-index:1;
  display:flex;flex-direction:column;align-items:center;justify-content:flex-end;
  padding:10px 12px 8px;box-sizing:border-box;gap:8px;
}
.compatfinder-section--home .compatfinder-visual:has(.jpmascot-search)>img{opacity:0 !important}
.jpmascot-search .jpmascot-figure{
  width:auto;max-width:94%;max-height:64%;flex:0 1 auto;position:relative;
  transform-origin:50% 88%;
}
.jpmascot-search .jpmascot-figure picture,
.jpmascot-search .jpmascot-figure img{
  position:static !important;inset:auto !important;display:block;
  width:auto !important;height:auto !important;max-width:100%;max-height:100%;
  object-fit:contain !important;object-position:center bottom !important;
  filter:none;
}
.jpmascot-search .jpmascot-bubble{
  max-width:100%;font-size:13px;line-height:1.35;padding:8px 12px;margin:0;
  flex:0 0 auto;
}
/* Tail at the bottom, toward the mascot below (both desktop and mobile in this slot). */
.jpmascot-search .jpmascot-bubble::before{
  left:50%;right:auto;top:auto;bottom:-12px;margin-left:-10px;
  border-width:12px 10px 0 10px;
  border-color:var(--jpm-color) transparent transparent transparent;
}
.jpmascot-search .jpmascot-bubble::after{
  left:50%;right:auto;top:auto;bottom:-9px;margin-left:-8px;
  border-width:10px 8px 0 8px;
  border-color:#fff transparent transparent transparent;
}
.compatfinder-section--home .compatfinder-visual:has(.jpmascot-search),
.jpmascot-search{overflow:hidden}
@media (max-width:767px){
  .jpmascot-search{padding:8px 10px 4px;gap:6px;justify-content:center}
  .jpmascot-search .jpmascot-bubble{font-size:12px;padding:7px 10px}
  .jpmascot-search .jpmascot-figure{max-height:54%}
}

/* Admin FAQ reorder */
.jpmascot-admin-item-head{display:flex;align-items:center;gap:8px;margin:0 0 8px;flex-wrap:wrap}
.jpmascot-admin-item-head h4{margin:0;flex:1 1 auto;font-size:13px}
.jpmascot-admin-drag{
  cursor:grab;display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border:1px solid #d0d5dd;border-radius:4px;background:#fff;
  color:#555;user-select:none;letter-spacing:-2px;font-size:14px;line-height:1;
}
.jpmascot-admin-drag:active{cursor:grabbing}
.jpmascot-admin-move{display:inline-flex;gap:4px}
.jpmascot-admin-move button{min-width:32px;min-height:32px;padding:0 6px;line-height:1}
.jpmascot-admin-del{margin:0 !important;font-weight:600}
.jpmascot-admin-placeholder{height:24px;border:2px dashed #2fb5d2;border-radius:4px;margin:0 0 12px;background:#e8f4fa}
.jpmascot-admin-item.ui-sortable-helper{box-shadow:0 4px 16px rgba(0,0,0,.12)}

/* 1.0.2 — mobile bubble above the mascot (tail pointing down). */
@media (max-width:767px){
  .jpmascot-aside.jpmascot-bubble-mobile-above,
  .jpmascot-float.jpmascot-bubble-mobile-above{
    flex-direction:column-reverse;
  }
  .jpmascot-aside.jpmascot-bubble-mobile-above .jpmascot-bubble::before,
  .jpmascot-float.jpmascot-bubble-mobile-above .jpmascot-bubble::before{
    left:50%;right:auto;top:auto;bottom:-12px;margin-left:-10px;
    border-width:12px 10px 0 10px;
    border-color:var(--jpm-color) transparent transparent transparent;
  }
  .jpmascot-aside.jpmascot-bubble-mobile-above .jpmascot-bubble::after,
  .jpmascot-float.jpmascot-bubble-mobile-above .jpmascot-bubble::after{
    left:50%;right:auto;top:auto;bottom:-9px;margin-left:-8px;
    border-width:10px 8px 0 8px;
    border-color:#fff transparent transparent transparent;
  }
  /* Search mascot is already bubble-then-figure; "below" reverses it. */
  .jpmascot-search.jpmascot-bubble-mobile-below{
    flex-direction:column-reverse;
  }
  .jpmascot-search.jpmascot-bubble-mobile-below .jpmascot-bubble::before{
    left:50%;right:auto;bottom:auto;top:-12px;margin-left:-10px;
    border-width:0 10px 12px 10px;
    border-color:transparent transparent var(--jpm-color) transparent;
  }
  .jpmascot-search.jpmascot-bubble-mobile-below .jpmascot-bubble::after{
    left:50%;right:auto;bottom:auto;top:-9px;margin-left:-8px;
    border-width:0 8px 10px 8px;
    border-color:transparent transparent #fff transparent;
  }
}

/* Search mascot as a tidy top row when the compatfinder block has no picture slot. */
.jpmascot-search-row{
  display:flex;justify-content:center;align-items:flex-end;
  margin:0 0 12px;padding:0;
}
.jpmascot-search-row .jpmascot-search{
  position:relative;inset:auto;height:auto;width:100%;max-width:360px;
  padding:8px 10px 4px;overflow:hidden;justify-content:flex-end;
}
.jpmascot-search-row .jpmascot-search .jpmascot-figure{
  max-height:160px;height:160px;width:auto;overflow:hidden;
}
.jpmascot-search-row .jpmascot-search .jpmascot-figure img{
  max-height:160px !important;height:auto !important;width:auto !important;
}
@media (max-width:767px){
  .jpmascot-search-row{margin:0 0 8px}
  .jpmascot-search-row .jpmascot-search .jpmascot-figure{max-height:130px;height:130px}
  .jpmascot-search-row .jpmascot-search .jpmascot-figure img{max-height:130px !important}
}


/* 1.0.3 — peeking head on full-width compatibility pages. Positioned
   absolutely on the white widget so the module's layout height does not grow. */
body.jp-shop-1.compatfinder-page .compatfinder-section,
body.jp-shop-1#module-compatfinder-root .compatfinder-section,
body.jp-shop-1#module-compatfinder-search .compatfinder-section,
body.jp-shop-1.compatfinder-page .compatfinder-widget,
body.jp-shop-1#module-compatfinder-root .compatfinder-widget,
body.jp-shop-1#module-compatfinder-search .compatfinder-widget{
  overflow:visible;
}
body.jp-shop-1.compatfinder-page .compatfinder-widget,
body.jp-shop-1#module-compatfinder-root .compatfinder-widget,
body.jp-shop-1#module-compatfinder-search .compatfinder-widget{
  position:relative;
}
.jpmascot-search-peek-row{
  position:absolute;
  left:0;right:0;top:0;
  height:0;margin:0;padding:0;
  overflow:visible;
  z-index:4;
  pointer-events:none;
}
.jpmascot-search-peek-row .jpmascot-search-peek{
  position:absolute;
  left:3%;
  top:0;
  transform:translateY(-58%);
  display:flex;
  flex-direction:row;
  align-items:flex-end;
  gap:12px;
  width:auto;
  max-width:min(560px, 94%);
  height:auto;
  inset:auto;
  padding:0;
  margin:0;
  overflow:visible !important;
  pointer-events:none;
}
.jpmascot-search-peek-row .jpmascot-figure{
  width:min(300px, 38vw);
  height:auto !important;
  max-height:none !important;
  max-width:none;
  flex:0 0 auto;
  overflow:visible;
  transform:none;
}
.jpmascot-search-peek-row .jpmascot-figure picture,
.jpmascot-search-peek-row .jpmascot-figure img{
  width:100% !important;
  height:auto !important;
  max-width:100%;
  max-height:none !important;
  object-fit:contain !important;
  object-position:center bottom !important;
  display:block;
}
.jpmascot-search-peek-row .jpmascot-bubble{
  pointer-events:none;
  margin:0 0 18px;
  font-size:14px;
  line-height:1.35;
  max-width:240px;
  position:relative;
  flex:0 1 auto;
}
/* Tail points left, toward the head, sitting on the box edge. */
.jpmascot-search-peek-row .jpmascot-bubble::before{
  left:-12px;right:auto;top:auto;bottom:14px;margin-left:0;
  border-width:10px 12px 10px 0;
  border-color:transparent var(--jpm-color) transparent transparent;
}
.jpmascot-search-peek-row .jpmascot-bubble::after{
  left:-9px;right:auto;top:auto;bottom:16px;margin-left:0;
  border-width:8px 10px 8px 0;
  border-color:transparent #fff transparent transparent;
}
@media (max-width:767px){
  .jpmascot-search-peek-row .jpmascot-search-peek{
    left:2%;
    transform:translateY(-55%);
    max-width:96%;
    gap:6px;
  }
  .jpmascot-search-peek-row .jpmascot-figure{width:min(168px, 44vw)}
  .jpmascot-search-peek-row .jpmascot-bubble{
    font-size:12px;padding:7px 10px;max-width:150px;margin:0 0 10px;
  }
}
