@charset "UTF-8";

/* Hide big heading from template */
.search-heading, .tap-instruction { display: none !important; }

/* Status line */
.search-status {
  margin:.75rem auto 1rem;
  max-width:900px;
  font-size:.95rem;
  color:#c9d4a8;
  text-align:center;
  min-height:1.2em;
}
.search-status .dot {
  display:inline-block;
  width:.65em;
  height:.65em;
  margin-right:.5em;
  border-radius:50%;
  background:currentColor;
  animation:kw-pulse 1s infinite ease-in-out;
  vertical-align:middle;
}
.search-status.is-done .dot { display:none; }
@keyframes kw-pulse {
  0% { opacity:.25; transform:scale(.8) }
  50% { opacity:1; transform:scale(1) }
  100% { opacity:.25; transform:scale(.8) }
}

/* Results container */
#proverb-results {
  max-width:900px;
  margin:1.5rem auto;
  line-height:1.6;
}

/* Card */
.proverb-card {
  position:relative;
  background:#222;
  color:#eee;
  padding:1rem;
  border-radius:10px;
  margin-bottom:1rem;
  box-shadow:0 2px 6px rgba(0,0,0,.3);
  display:flex;
  flex-direction:column;
}

/* Top row: JP line + button */
.proverb-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.proverb-ja {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: .25rem;
  letter-spacing: 0.05em;
  padding-right: 5.5rem;   /* ← reserve space for the E-voice button */
  box-sizing: border-box;  /* ensures padding counts into total width */
}

/* E-voice button in corner */
.proverb-voice {
  position:absolute;
  top:12px;
  right:14px;
  margin:0;
}

/* Voice-tab button base */
.voice-tab {
  border:0;
  border-radius:8px;
  padding:6px 14px;
  font-weight:550;
  font-size:1rem;
}

/* State: enabled */
.voice-tab.enabled {
  color:#fffaf0;
  background:#a67c00;   /* E-voice gold */
  cursor:pointer;
  font-weight:500;  
}
.voice-tab.enabled:hover {
  background:#e0aa40;
}

/* State: disabled */
.voice-tab.disabled {
  color:#8b8b8b;
  background:#3a3a3a;
  cursor:not-allowed;
  pointer-events:none;
  opacity:.7;
}

/* English lines */
.proverb-en {
  font-size:1rem;
  color:bisque;
  margin-top:.4rem;
  line-height:1.5;
}
.proverb-hint {
  margin-top:.35rem;
  font-size:.88rem;
  font-style:italic;
  line-height:1.5;
  color:olivedrab;
}

/* Tappable kanji */
.kw-kanji-link {
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.kw-kanji-link:hover {
  text-decoration-thickness:2px;
}

/* No results */
.proverb-empty {
  color:bisque;
  text-align:center;
  margin:1rem 0 2rem;
}

/* Logo/Status spacing tweaks */
.kw-logo { margin-bottom:.25rem; }
#proverb-status {
  margin-top:0;
  margin-bottom:1rem;
}

/* Bottom tabs: KFR 3K and Search */
.kanji-tabs .kfr-tab {
  background-color:#6a5a8c;
  color:#fff;
  padding:6px 14px;
  border-radius:8px;
  font-weight:500;
  text-decoration:none;
  transition:background .2s;
}
.kanji-tabs .kfr-tab:hover {
  background-color:#4D3C71;
}
.kanji-tabs a[title="Search Kanji & Radicals"] {
  background-color:#d4a63c;
  color:#000;
  padding:6px 14px;
  border-radius:8px;
  font-size:1.1rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:background .2s;
}
.kanji-tabs a[title="Search Kanji & Radicals"]:hover {
  background-color:#e6bb52;
}

/* Flex row for title + search */
.saying-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0 20px;
  gap: 12px;
  flex-wrap: wrap; /* fallback for small screens */
}

/* Left title */
.saying-title {
  font-size: 1.10em;
  color: burlywood;
  margin: 0;
}

/* Search form */
.saying-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Make the box narrower + white background */
.saying-search input[type="text"] {
  width: 120px;           /* narrower width */
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #998851; /* softer #877853order */
  border-radius: 4px;
  font-size: 0.9em;
  background: #fff;       /* white background */
  color: #222;            /* dark text */
}

.saying-search button {
  background-color: goldenrod;
  border: 1px solid #666;   /* darker golden border */
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  color: #222;
}

.saying-search button:hover {
  background-color: #d49800;
}

/* Force narrower width on the sayings page */
.saying-header .saying-search #pv-q,
#pv-q.saying-input {
  width: 100px !important; 
}

.say-explainer {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 16px;
}

.say-line1 {
  font-family: "Shippori Mincho B1", "Yu Mincho", serif;
  font-size: 21px;
  font-weight: 600;
  text-align: center;
  margin: 8px 0 6px;
  letter-spacing: 0.04em;

  /* rainbow text */
  background: linear-gradient(
    90deg,
    #ff5f6a 0%,
    #ffa94a 20%,
    #ffe66d 35%,
    #7dff84 50%,
    #5fd9ff 65%,
    #8a7bff 80%,
    #ff6bce 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* glow so it doesn’t get lost on black */
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

details {
  padding: 0px 10px;  /* adds 10px left/right spacing */
  margin-top: 4px;
}

details p {
  margin: 8px 0;
  line-height: 1.5;
}

/* =====================================
   Category Tabs – Responsive 4-column layout
   ===================================== */
#category-tabs {
  display: flex;
  justify-content: space-between; /* distribute evenly */
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 480px;               /* optional: center nicely on wide screens */
  margin: 0 auto;
}

/* Base tab style */
.saying-tab {
  flex: 1 1 25%;                  /* roughly quarter width */
  text-align: center;
  text-decoration: none;
  background-color: #4b3f54;      /* cool purple-gray */
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 0;
  font-size: 0.9rem;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Hover and active states */
.saying-tab:hover {
  background-color: #5a4d63;
  color: #fff3c0;
}

.saying-tab.active {
  background-color: #ca952e;  /* kakishibu orange */
  color: #fff;
  font-weight: 600;
  border-color: #ca952e;
}

/* Refresh tab (slightly smaller visual balance) */
.refresh-tab {
  flex: 0 1 15%;
  background-color: #9b6b3d;      /* reddish brown base */
  color: #fff3c0;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.25);
}

.refresh-tab:hover {
  background-color: #b27d47;      /* brighter kakishibu tone */
  color: #fff;
}

/* Icon sizing */
.refresh-tab i {
  font-size: 1rem;
  vertical-align: middle;
}

/* make card a positioning context */
.pv-card {
  position: relative;
  padding-bottom: 32px; /* leave room for the tiny footer text */
}

/* ===== Saying+ Card Footer Label (Kanji World Style) ===== */

/* Card context */
.pv-card {
  position: relative;
  padding-bottom: 32px;  /* room for the small footer text */
}

/* Subtle category label at bottom right */
.pv-category-tag {
  position: absolute;
  right: 10px;
  bottom: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);  /* calm “sabi” tone */
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15px;
  text-transform: none;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 0;
  transform: translateY(3px);
}

/* When .show-tag is applied (only initial load) */
.pv-card.show-tag .pv-category-tag {
  opacity: 1;
  transform: translateY(0);
}
