/* public/css/cong-cu.css — kiểu dáng cho các trang công cụ chạy bộ */

.khung-trang-cong-cu {
  max-width: 800px;
  margin: 32px auto 64px auto;
  padding: 0 16px;
}

.dau-trang-cong-cu {
  margin-bottom: 24px;
}

.dau-trang-cong-cu h1 {
  font-size: 1.8rem;
  color: var(--navy-800, #082054);
  margin-bottom: 8px;
  line-height: 1.3;
}

.dau-trang-cong-cu .mo-ta-ngan {
  color: var(--gray-600, #4b5563);
  font-size: 1rem;
  line-height: 1.5;
}

/* Tab chuyển chế độ */
.tab-cong-cu-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}

.tab-cong-cu {
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--gray-500, #6b7280);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-cong-cu:hover {
  color: var(--navy-800, #082054);
}

.tab-cong-cu.dang-chon {
  color: var(--teal-600, #0087a3);
  border-bottom-color: var(--teal-500, #00a9cc);
}

/* Hộp form công cụ */
.hop-cong-cu {
  background: #ffffff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(8, 32, 84, 0.04);
  margin-bottom: 32px;
}

.nhom-nhap {
  margin-bottom: 20px;
}

.nhom-nhap label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-800, #082054);
  margin-bottom: 6px;
}

.nhom-nhap input[type="text"],
.nhom-nhap input[type="number"],
.nhom-nhap input[type="date"],
.nhom-nhap select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease;
}

.nhom-nhap input:focus,
.nhom-nhap select:focus {
  border-color: var(--teal-500, #00a9cc);
  box-shadow: 0 0 0 3px rgba(0, 169, 204, 0.15);
}

.chu-chu-thich {
  font-size: 0.85rem;
  color: var(--gray-500, #6b7280);
  margin-top: 4px;
}

.chu-bao-loi {
  display: none;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 4px;
}

.chu-bao-loi.co-loi {
  display: block;
}

/* Nút nhanh cự ly */
.nut-nhanh-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.nut-nhanh {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--gray-200, #e5e7eb);
  background: var(--gray-50, #f9fafb);
  border-radius: 20px;
  cursor: pointer;
  color: var(--gray-700, #374151);
  transition: all 0.15s ease;
}

.nut-nhanh:hover,
.nut-nhanh.dang-chon {
  background: var(--teal-50, #e6f7fa);
  color: var(--teal-700, #007088);
  border-color: var(--teal-300, #73d1e4);
}

/* Khối kết quả */
.hop-ket-qua {
  background: linear-gradient(135deg, #f0fdfa, #e6f7fa);
  border: 1px solid #bbf7d0;
  border-color: rgba(0, 169, 204, 0.25);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.hop-ket-qua h3 {
  font-size: 1.1rem;
  color: var(--navy-800, #082054);
  margin-bottom: 12px;
}

.hang-ket-qua {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(8, 32, 84, 0.1);
}

.hang-ket-qua:last-child {
  border-bottom: none;
}

.nhan-kq {
  color: var(--gray-700, #374151);
  font-size: 0.95rem;
}

.so-kq {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--teal-700, #007088);
}

.so-kq.chinh {
  font-size: 1.5rem;
  color: var(--navy-800, #082054);
}

/* Bảng mốc chia pace */
.bang-moc-chia {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}

.bang-moc-chia th,
.bang-moc-chia td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(8, 32, 84, 0.08);
}

.bang-moc-chia th {
  background: rgba(0, 169, 204, 0.1);
  color: var(--navy-800, #082054);
  font-weight: 600;
}

/* Khối nội dung bài viết tĩnh (SEO) */
.khoi-kien-thuc {
  background: #ffffff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.khoi-kien-thuc h2 {
  font-size: 1.3rem;
  color: var(--navy-800, #082054);
  margin-bottom: 12px;
}

.khoi-kien-thuc p {
  color: var(--gray-600, #4b5563);
  line-height: 1.6;
  margin-bottom: 12px;
}

.khoi-kien-thuc p:last-child {
  margin-bottom: 0;
}

/* Thẻ giới thiệu Bống Hub & link chéo */
.the-gioi-thieu-hub {
  background: linear-gradient(135deg, var(--navy-800, #082054), #0c2d74);
  color: #ffffff;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.the-gioi-thieu-hub h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: #ffffff;
}

.the-gioi-thieu-hub p {
  font-size: 0.95rem;
  color: #93c5fd;
  line-height: 1.4;
}

.nut-link-hub {
  display: inline-block;
  padding: 10px 18px;
  background: var(--teal-500, #00a9cc);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.nut-link-hub:hover {
  background: #0087a3;
}

.dieu-huong-cheo {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.link-cheo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--gray-100, #f3f4f6);
  color: var(--navy-800, #082054);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.link-cheo:hover {
  background: var(--teal-50, #e6f7fa);
  color: var(--teal-700, #007088);
}

@media (max-width: 600px) {
  .the-gioi-thieu-hub {
    flex-direction: column;
    align-items: flex-start;
  }
  .dau-trang-cong-cu h1 {
    font-size: 1.5rem;
  }
  .hop-cong-cu {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
