/* Tool page layout */
.toolLayout {
  max-width: 720px;
  margin: 0 auto 5px;
}

/* Form */
.form .field { margin-bottom: 20px; }

.label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* (You’ll improve button UI later; keep behavior here) */
/* .btn {
  transition: background 0.15s ease, transform 0.08s ease;
}
.btn:hover { background: var(--primary-hover, #4338ca); }
.btn:active { transform: translateY(1px); } */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.btn:active {
  transform: translateY(1px);
}



/* Result box */
.result {
  margin-top: 24px;
  padding: 20px;
  background: var(--primary-soft);
  border-radius: 12px;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.resultRow { display: flex; justify-content: space-between; margin-bottom: 8px; }
.k { color: var(--text-muted); font-size: 0.9rem; }
.v { font-weight: 700; font-size: 1.1rem; color: var(--primary); }

/* Rails */
.rail {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--bg-panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.railHead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  caret-color: transparent;
}

.railTitle { font-size: 0.95rem; font-weight: 700; }
.railSub { font-size: 0.8rem; color: var(--text-muted); }

.railChips { display: flex; flex-wrap: wrap; gap: 8px; }

.railChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #f8fafc;
  transition: all 0.15s ease-out;
}

.railChip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.railChip--active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.railChipCode {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Ad slots */
.ad-reveal {
  display: none;
}

.ad-reveal.is-visible {
  display: block;
}

.adRail {
  margin-top: 28px;
  text-align: center;
}

.adRail .adsbygoogle {
  width: 100%;
}

.sideAds {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}

.sideAdsItem {
  position: absolute;
  top: 450px;
  width: 160px;
  min-height: 600px;
  pointer-events: auto;
}

.sideAdsItem--left {
  left: max(26px, calc((100vw - 1280px) / 2));
}

.sideAdsItem--right {
  right: max(26px, calc((100vw - 1280px) / 2));
}

/* Reduce this breakpoint if you want side ads to appear on narrower desktop widths. */
@media (max-width: 1199px) {
  .sideAds,
  .sideAds.is-visible {
    display: none;
  }
}

/* Collapsible language rail */
.rail--lang { padding-top: 16px; caret-color: transparent;}
.rail--lang summary { list-style: none; cursor: pointer; }
.rail--lang summary::-webkit-details-marker { display: none; }

.srOnly {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* .railChevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #f8fafc;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.railChevron::before {
  content: "›";
  font-size: 18px;
  line-height: 1;
}

details[open].rail--lang .railChevron {
  transform: rotate(90deg);
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
} */

/* Rail (Language Section) UI 개선 */
/* 화살표: 기본 상태는 오른쪽(>)을 보고 있음 */
.railChevron {
  display: inline-flex;
  /* align-items: center; */
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #f8fafc;
  transition: all 0.2s ease;
  font-weight: bold;
}

.railChevron::before {
  content: "›"; /* 오른쪽 화살표 */
  font-size: 20px;
  line-height: 1;
  padding-bottom: 2px; /* 시각적 중앙 정렬 보정 */
}

/* Details가 Open 상태일 때 */
details[open] .railChevron {
  transform: rotate(90deg); /* 90도 회전하여 아래(v)를 보게 함 */
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* 제목 부분: Open 상태일 때 Bold 처리 */
details[open] .railTitle {
  color: var(--primary);
}
