/* Danh bạ (#/danh-ba): tinhtienso /contact, research/ui screens 03, 04, 05, 25 and tts-dom.json
   "contact-desktop" / "contact-modal-add" / "contact-mobile". Bootstrap look, Nunito 12px.
   Shell, buttons, form-control, tables (red header, sticky .col-actions), modals: ../styles.css. */

/* The site's block starts 10px right of the sidebar and keeps a vertical scrollbar track on its right
   (overflow-y: scroll), so on Windows the table ends 25px before the window edge as on screen 03. */
.view-danh-ba { padding: 0 0 28px; }
.contact-wrap { margin: 0 10px; padding-top: 5px; overflow-y: scroll; }

/* ---------------------------------------------------------- "Tên, SĐT" + Xem + Thêm */
.contact-search { display: flex; flex-wrap: wrap; align-items: stretch; padding: 0 5px; }
.contact-search-input { flex: none; width: 178px; }
.contact-search-btns { display: flex; margin-left: 14px; }
.contact-search-btns .btn { padding: 6px 12px; }
.contact-btn-view { gap: 0; }
.contact-btn-add { gap: 4px; }
.contact-search-btns .btn .ic { font-size: 12px; }

/* ---------------------------------------------------------- table */
.contact-table-wrap { margin-top: 26px; }
.contact-table { margin-bottom: 16px; }
.contact-table td { font-size: 14px; color: #3f4254; }
.contact-table td.empty-row { font-size: 12px; }
.contact-actions { line-height: 18px; white-space: nowrap; }
.contact-table th.col-actions { white-space: normal; } /* "THAO / TÁC" wraps on phones as on the site */
.contact-act {
  display: inline-flex; align-items: center; justify-content: center; height: 18px; padding: 0; margin: 0;
  border: 0; background: none; color: #3f4254; font-size: 14px; line-height: 1; cursor: pointer; vertical-align: top;
}
.contact-act + .contact-act { margin-left: 8px; }
.contact-act:hover { color: #000; }
.contact-act .ic { vertical-align: 0; }
/* Font Awesome's trash / copy glyphs are 12px wide at 14px */
.contact-act .ic-trash, .contact-act .ic-copy { margin: 0 -1px; transform: scaleX(.86); }

/* ---------------------------------------------------------- "Thêm mới danh bạ" modal (screens 04, 05) */
@media (min-width: 576px) { .contact-modal .modal-dialog, .contact-delete-modal .modal-dialog { margin-top: 30px; } }
/* Bootstrap 4 footer buttons keep a 4px margin: footer 64px tall as on the site */
.contact-modal .modal-footer .btn, .contact-delete-modal .modal-footer .btn { margin: 4px 0; }
.contact-modal .modal-body { max-height: 500px; overflow-y: auto; padding: 20px 33px 16px; }
.contact-form { font-size: 12px; color: #3f4254; }
.contact-form .form-group { margin-bottom: 16px; }
.contact-form label { display: inline-block; margin: 0 0 8px; font-weight: 500; line-height: 17px; }
.contact-form .form-control { font-size: 12px; }

/* bot account: [prefix chip][input] [copy] */
.contact-bot-row { display: flex; align-items: stretch; }
.contact-bot-row > .form-control { flex: 1 1 auto; width: 1%; min-width: 0; }
.contact-bot-group { flex: 1 1 auto; display: flex; min-width: 0; }
.contact-bot-group .form-control { flex: 1 1 auto; width: 1%; min-width: 0; border-radius: 0; }
.contact-bot-prefix {
  flex: none; height: 40px; padding: 6px 12px; border-radius: 5.6px 0 0 5.6px; cursor: default;
  max-width: 45%; overflow: hidden; text-overflow: ellipsis;
}
.contact-bot-prefix:hover { background: var(--primary); border-color: var(--primary); }
.contact-copy { flex: none; width: 36px; height: 40px; margin-left: 8px; padding: 6px 12px; border-radius: 5.6px; }
.contact-copy .ic { font-size: 12px; }

/* checkboxes / radios (Bootstrap .form-check, native 13px inputs) */
.contact-form .form-check { position: relative; display: block; padding-left: 20px; }
.contact-form .form-check-input { position: absolute; left: 0; top: 1.6px; width: 13px; height: 13px; margin: 0; cursor: pointer; }
.contact-form .form-check-label { margin: 0; cursor: pointer; }
.contact-check { min-height: 17px; margin: 0 0 16px; }
.contact-radio-group { margin: 0 0 17px; }
.contact-radio-title { display: block !important; margin: 0 !important; padding-right: 5px; cursor: default !important; }
.contact-radios { display: flex; flex-wrap: wrap; margin-top: 9px; }
.contact-form .form-check-inline { display: inline-flex; align-items: center; margin: 0 12px 0 8px; padding-left: 0; }
.contact-form .form-check-inline .form-check-input { position: static; margin: 0 5px 0 0; top: auto; }

/* "GIÁ CÒ & SỐ TIỀN THẮNG MIỀN NAM" + the price table (Material-UI look on the site) */
.contact-section-title {
  margin: -1px 0 4px; padding-top: 20px; font-size: 15px; font-weight: 500; line-height: 23px;
  text-transform: uppercase; letter-spacing: .02em; color: #3f4254;
}
.contact-price-table { width: 100%; margin: 0 0 16px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.contact-col-kind { width: 92px; }
.contact-price-table th {
  padding: 16px; background: #fff; border-bottom: 1px solid #e0e0e0;
  font-size: 12px; font-weight: 500; line-height: 23px; text-align: center; color: #3f4254;
}
.contact-price-table td { padding: 16px; border-bottom: 1px solid #e0e0e0; vertical-align: middle; }
.contact-price-table td.contact-kind { padding: 0 4px; font-weight: 500; text-align: center; }
.contact-price-box {
  display: flex; height: 35.6px; border: .8px solid #c4c4c4; border-radius: 5px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.contact-price-box:hover { border-color: #3f4254; }
.contact-price-box:focus-within { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.contact-price-box.is-invalid { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.contact-price-input {
  flex: 1 1 auto; width: 100%; min-width: 0; height: 34px; padding: 8.5px 14px; border: 0; border-radius: 4px;
  background: transparent; color: #3f4254; font: inherit; font-size: 12px; line-height: 17px; outline: 0;
}

/* delete confirmation */
.contact-delete-text { margin: 0; font-size: 13px; }

/* ---------------------------------------------------------- phone (screen 25, "contact-mobile") */
@media (max-width: 767.98px) {
  .contact-wrap { padding-top: 3px; }
  .contact-search-input { width: 100%; }
  .contact-search-btns { margin: 5px 0 0 -1px; }
  .contact-search-btns .btn { height: 32px; }
  .contact-table-wrap { margin-top: 25px; }
}
@media (max-width: 575.98px) {
  .contact-modal .modal-body { max-height: calc(100dvh - 160px); padding: 16px; }
  .contact-price-table th, .contact-price-table td { padding: 10px 6px; }
  .contact-col-kind { width: 76px; }
  .contact-price-input { padding: 8.5px 10px; }
}
