/* uranai-filter.css */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* ─── 固定バー ─── */
.ufw-root {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 860px;
  z-index: 99999;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  box-sizing: border-box;
  padding: 0 16px 16px;
  background: transparent !important;
}

.ufw-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  background: transparent !important;
  background-color: transparent !important;
  color: #c694ef !important;
  border: 2px solid #c694ef !important;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  box-shadow: none !important;
  position: relative;
  overflow: hidden;
  transition: background 0.15s;
}
.ufw-toggle-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 0;
  pointer-events: none;
}
.ufw-toggle-bar > * {
  position: relative;
  z-index: 1;
}
.ufw-toggle-bar:hover::before {
  background: rgba(255, 255, 255, 0.72);
}

.ufw-badge {
  background: #c694ef;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.5;
}

.ufw-chevron { font-size: 10px; opacity: 0.6; margin-left: 2px; }

/* ─── モーダル内レイアウト ─── */
.ufw-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #9ca3af;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.ufw-hint {
  font-weight: 400;
  letter-spacing: 0;
  color: #d1d5db;
  font-size: 11px;
}

.ufw-reselect {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  margin-left: auto;
  padding: 0;
}

.ufw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.ufw-pill {
  padding: 8px 16px;
}

.ufw-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 0 0 24px;
}

/* ─── 絞り込みボタン ─── */
.ufw-filter-btn {
  background: #c694ef;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 48px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.04em;
  transition: all 0.18s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  min-height: 52px;
}
.ufw-filter-btn:hover { background: #d4a8f5; box-shadow: 0 4px 18px rgba(0,0,0,0.22); }

.ufw-reset-btn {
  display: block;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  margin: 10px auto 0;
}

/* ─── ヘッダー内リセットリンク ─── */
.ufw-header-reset-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 4px 0;
  margin: 0;
  white-space: nowrap;
}

/* ─── モーダル下部ボタンエリア（常時固定表示） ─── */
.ufw-modal-cta {
  flex-shrink: 0;
  text-align: center;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  background: transparent;
}
.ufw-modal-cta .ufw-filter-btn {
  width: 100%;
  max-width: 420px;
  justify-content: center;
  white-space: normal;
}

@media (max-width: 600px) {
  .ufw-root { padding: 0 12px 12px; }
  .ufw-toggle-bar { padding: 14px 20px; font-size: 13px; }
  .ufw-pill { padding: 6px 13px; }
  .ufw-filter-btn { padding: 13px 32px; font-size: 14px; }
}

/* ─── 結果カード（mockup-v7） ─── */
@keyframes ufwFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.ufw-card {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
  overflow: hidden;
  animation: ufwFadeIn 0.35s ease both;
}
.ufw-card-main {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: start;
}
.ufw-teller-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ufw-teller-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ufw-teller-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ufw-teller-photo-placeholder {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}
.ufw-left-site-name {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ufw-left-site-name:hover { text-decoration: underline; }
.ufw-info-row {
  margin-bottom: 4px;
}
.ufw-teller-name {
  font-size: 21px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: inherit;
}
.ufw-teller-name:hover { opacity: 0.7; }
.ufw-concerns {
  font-size: 15.6px;
  color: #475569;
  margin-bottom: 6px;
}
.ufw-tags {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.ufw-tag-divider {
  width: 1px;
  background: #e2e8f0;
  align-self: stretch;
}
.ufw-tag-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ufw-tag-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.ufw-tag-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.ufw-tag-senjutsu {
  display: inline-block;
  padding: 2px;
  border-radius: 30px;
  background: linear-gradient(135deg, #c8a8d8, #9b7bc8);
}
.ufw-tag-senjutsu span {
  display: block;
  background: #fff;
  background-clip: padding-box;
  padding: 3px 10px;
  border-radius: 30px;
  color: #9b7bc8;
  font-weight: bold;
  font-size: 12px;
  white-space: nowrap;
}
.ufw-tag-style {
  display: inline-block;
  padding: 2px;
  border-radius: 30px;
  background: linear-gradient(135deg, #7aacd0, #5b8ab8);
}
.ufw-tag-style span {
  display: block;
  background: #fff;
  background-clip: padding-box;
  padding: 3px 10px;
  border-radius: 30px;
  color: #5b8ab8;
  font-weight: bold;
  font-size: 12px;
  white-space: nowrap;
}
.ufw-btn-detail {
  display: inline-block;
  background: linear-gradient(-30deg, #e07a7e, #e8a07a);
  color: #fff !important;
  border: 0;
  padding: 0 28px;
  height: 44px;
  line-height: 44px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none !important;
  position: relative;
  outline: 2px solid rgb(255 255 255 / 20%);
  outline-offset: -3px;
  transition: opacity 0.15s ease;
}
.ufw-btn-detail::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid #fff;
  border-right: 1.5px solid #fff;
  transform: rotate(45deg);
  margin-left: 8px;
  vertical-align: middle;
}
.ufw-btn-detail:hover { opacity: 0.75; }
/* js-link-helper .jump 上書き */
.ufw-btn-detail.jump,
.ufw-btn-detail.jump:hover,
.ufw-btn-detail.jump:visited,
.ufw-btn-detail.jump:focus,
.ufw-btn-detail.jump:active {
  color: #fff !important;
  text-decoration: none !important;
}
span.ufw-btn-detail,
span.ufw-btn-detail:hover,
span.ufw-btn-detail:visited,
span.ufw-btn-detail:focus,
span.ufw-btn-detail:active {
  color: #fff !important;
  text-decoration: none !important;
}
.ufw-metrics-bar {
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  padding: 10px 22px;
  display: flex;
  gap: 16px;
  align-items: start;
}
.ufw-metric-price,
.ufw-metric-bonus-wrap {
  flex-shrink: 0;
}
.ufw-metric-review-wrap {
  flex: 1;
  min-width: 0;
}
.ufw-metric-label {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.ufw-metric-value {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
}
.ufw-metric-value .ufw-unit {
  font-size: 13px;
  color: #64748b;
  font-weight: 400;
}
.ufw-metric-bonus {
  font-size: 17px;
  font-weight: 600;
  color: #dc2626;
}
.ufw-metric-review {
  font-size: 15px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ufw-accordion {
  border-top: 1px solid #f1f5f9;
}
.ufw-accordion-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.ufw-accordion-toggle:hover { background: #f8fafc; }
.ufw-accordion-arrow {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 10px;
}
.ufw-accordion-toggle.ufw-open .ufw-accordion-arrow {
  transform: rotate(180deg);
}
.ufw-accordion-body {
  display: none;
  padding: 0 22px 14px;
}
.ufw-accordion-body.ufw-open {
  display: block;
}
.ufw-review-item {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.ufw-review-item:last-child {
  border-bottom: none;
}
.ufw-review-source {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}

/* モバイル対応 */
@media (max-width: 560px) {
  .ufw-card-main {
    grid-template-columns: 80px 1fr;
    gap: 10px;
    padding: 14px 14px 10px;
  }
  .ufw-teller-photo {
    width: 70px;
    height: 70px;
  }
  .ufw-left-site-name {
    font-size: 10px;
  }
  .ufw-teller-name {
    font-size: 15px;
  }
  .ufw-concerns {
    font-size: 11px;
    margin-bottom: 4px;
  }
  .ufw-tag-senjutsu span,
  .ufw-tag-style span {
    padding: 1px 7px;
    font-size: 9px;
  }
  .ufw-tags {
    grid-column: 1 / -1;
    gap: 8px;
  }
  .ufw-btn-detail {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    height: 42px;
    line-height: 42px;
    font-size: 14px;
  }
  .ufw-metrics-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    padding: 10px 14px;
  }
  .ufw-metric-review-wrap {
    grid-column: 1 / -1;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
  }
  .ufw-metric-review {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.5;
    font-size: 12px;
  }
  .ufw-review-item {
    font-size: 12px;
  }
  .ufw-accordion-toggle { padding: 10px 14px; }
  .ufw-accordion-body { padding: 0 14px 14px; }
}
