/*
 * Bo sung cho `custom.css` cua ban goc.
 *
 * Bootstrap 3.3.7 + font-awesome 4.7 + custom.css da lo gan het phan nhin
 * thay duoc cua trang cong cu. Tep nay chi them nhung gi ban goc lam bang
 * thuoc tinh inline hoac bang JavaScript, va vai chinh sua cho man hinh hep.
 */

/* Menu tha xuong co nhieu muc nen can gioi han chieu cao va cho cuon. */
.navbar-nav .dropdown-menu {
  max-height: 80vh;
  overflow-y: auto;
}

/* Tieu de buoc co the gap lai - them con tro va mui ten. */
.headerBlue.collapsible {
  cursor: pointer;
  user-select: none;
}

.headerBlue.collapsible:hover {
  text-decoration: underline;
}

.headerBlue .toggle-caret {
  float: right;
  font-size: 14px;
  line-height: 24px;
}

/* --- Vung nhap va ket qua --- */

.data-textarea {
  width: 100%;
  font-family: Menlo, Consolas, 'Courier New', monospace;
  font-size: 13px;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.result-textarea {
  width: 100%;
  font-family: Menlo, Consolas, 'Courier New', monospace;
  font-size: 13px;
  background-color: #fbfbfb;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

/* --- Luoi tuy chon --- */

/*
 * Cac o chon nam canh nhau va tu xuong dong khi het cho.
 * Dung flex thay vi cot cua Bootstrap vi so luong control moi cong cu moi khac,
 * khong the chia cot co dinh cho tat ca.
 */
.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.option-item {
  flex: 0 1 auto;
  min-width: 220px;
}

.option-item.full-width {
  flex: 1 0 100%;
}

.option-item label {
  font-weight: normal;
  margin-bottom: 0;
}

.option-help {
  display: block;
  color: #888;
  font-size: 12px;
  margin-top: 2px;
}

/* Nhom radio chon ky tu phan cach xep ngang cho gon. */
.delimiter-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
}

.delimiter-choices label {
  font-weight: normal;
  margin: 0;
}

/* --- Ba tang sap xep --- */

.sort-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.sort-row .sort-label {
  width: 60px;
  color: #666;
  font-size: 13px;
}

/* --- Bang xem truoc du lieu --- */

.preview-wrapper {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #ddd;
  background: #fff;
}

.preview-table {
  margin-bottom: 0;
  font-size: 13px;
  white-space: nowrap;
}

.preview-table > thead > tr > th {
  position: sticky;
  top: 0;
  background: #f0f0f0;
  z-index: 1;
}

/* --- Cac manh nho --- */

.stat-badges .label {
  margin-right: 6px;
  font-size: 12px;
  font-weight: normal;
}

.tool-card {
  display: block;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #333;
  min-height: 92px;
}

.tool-card:hover {
  border-color: #2b3e50;
  text-decoration: none;
  color: #333;
}

.tool-card .tool-card-title {
  font-weight: 600;
  color: #2b3e50;
  display: block;
  margin-bottom: 4px;
}

.tool-card .tool-card-desc {
  color: #777;
  font-size: 13px;
}

.tool-card.planned {
  opacity: 0.62;
}

footer.site-footer {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #ddd;
  color: #777;
  font-size: 13px;
}

/* --- Man hinh hep --- */

@media (max-width: 767px) {
  .option-item {
    flex: 1 0 100%;
    min-width: 0;
  }

  .headerBlue {
    font-size: 16px;
  }
}
