/* style.css */
/* ----- 버튼템플릿 (버튼템플릿.txt) ----- */
.home-button {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  margin: auto;
  width: fit-content;
  padding: 14px 24px;
  background-color: #0066cc;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.3em;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  z-index: 999;
}
.home-button:hover {
  background-color: #004999;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}
.home-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  transform: skewX(-30deg);
  animation: shine 3s infinite;
}
@keyframes shine {
  0%   { left: -75%; }
  50%  { left: 125%; }
  100% { left: -75%; }
}
@media (max-width: 600px) {
  .home-button {
    font-size: 1.1em;
    padding: 10px 16px;
    top: 10px;
  }
}

/* ----- 계산기 기본 스타일 ----- */
body {
  font-family: 'Noto Sans KR', sans-serif;
  padding-top: 80px;
  background-color: #f5f7fa;
  color: #333;
  margin: 0;
}

.calculator {
  max-width: 400px;
  margin: 0 auto;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.calculator h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5em;
}

.type-toggle {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.type-btn {
  flex: 1;
  margin: 0 4px;
  padding: 10px 0;
  border: 2px solid #ccc;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1em;
}

.type-btn.active {
  background: #0066cc;
  border-color: #005bb5;
  color: #fff;
}

.inputs .input-group {
  margin-bottom: 16px;
}

.inputs .input-group.hidden {
  display: none;
}

.input-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 8px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* 한글 표기 색상 */
.korean-reading {
  margin-top: 4px;
  font-size: 0.9em;
  color: #006400;
  font-style: italic;
}

/* 환산보증금 표시 */
.conversion {
  margin-top: 8px;
  font-size: 0.95em;
  color: #333;
  font-weight: 500;
}

/* 적용 요율 그룹 */
#rate-group {
  display: flex;
  align-items: center;
}
#rate-group input[type="number"] {
  width: 100px;
  margin-right: 8px;
}
.edit-rate-btn {
  padding: 6px 12px;
  font-size: 0.9em;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.edit-rate-btn:hover {
  background-color: #e0e0e0;
}

/* 자동 요율 안내 */
.rate-note {
  font-size: 0.9em;
  color: #555;
  margin-top: 4px;
  font-style: italic;
}

.calculate-btn {
  width: 100%;
  padding: 12px;
  font-size: 1.1em;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.calculate-btn:hover {
  background: #005bb5;
}

.result {
  margin-top: 20px;
  padding: 16px;
  background: #e8f1ff;
  border-radius: 8px;
  font-size: 1em;
  line-height: 1.5;
}

.result.hidden {
  display: none;
}

.result details summary {
  cursor: pointer;
  color: #0066cc;
}

/* 수수료율 표 스타일 */
.fee-table {
  margin-top: 24px;
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.fee-table h2 {
  margin-bottom: 12px;
  font-size: 1.2em;
  text-align: center;
}
.fee-table h3 {
  margin-top: 16px;
  font-size: 1.1em;
}
.fee-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.fee-table th,
.fee-table td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: center;
}
.fee-table th {
  background: #f0f0f0;
}
.table-note {
  margin-top: 8px;
  font-size: 0.9em;
  color: #555;
}
.conversion-info {
  font-size: 0.9em;
  margin-top: 8px;
  line-height: 1.5;
  color: #444;
  background: #f9f9fc;
  padding: 10px;
  border-left: 4px solid #0066cc;
  border-radius: 6px;
}
