/* HDSD portlet - custom styles */
/* Title */
.hdsd-portlet .main-title {
  color: #2c3e50;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* ===============================
Table (Override Liferay Clay CSS)
=============================== */
.hdsd-portlet .hdsd-table {
  font-size: 14px;
  border-collapse: collapse !important;
  border: 1px solid #6984c2 !important;
}

.hdsd-portlet .hdsd-table thead th {
  background-color: #e9eff5 !important;
  color: #1e3a7b !important;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  /* Ép viền tất cả các cạnh của th */
  border: 1px solid #6984c2 !important;
}

.hdsd-portlet .hdsd-table tbody td {
  vertical-align: middle;
  text-align: center;
  color: #333;
  /* Ép viền tất cả các cạnh của td */
  border: 1px solid #6984c2 !important;
}

/* PDF icon */
.pdf-link {
  color: #dc3545;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
}

.pdf-link:hover {
  color: #a71d2a;
}

.no-file {
  font-size: 12px;
  color: #adb5bd;
}

/* Buttons - Search */
.btn-search-custom {
  background: #3f5fa3;
  color: #fff;
}

.btn-search-custom:hover {
  background-color: #162e5e;
  color: #fff;
}

.btn-add-custom {
  border: 1px solid #3f5fa3;
  color: #3f5fa3;
  background: #fff;
}

.btn-add-custom:hover {
  background: #e8eef8;
}

/* Action icon buttons */
.action-col {
  white-space: nowrap;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  color: #1e3a7b;
  font-size: 1rem;
}

.btn-icon:hover {
  background: #e8eef8;
}

.btn-delete-color {
  color: #dc3545 !important;
}

.btn-delete-color:hover {
  background: #fff0f0 !important;
}

/* Pagination */
.custom-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 14px;
  color: #555;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-size-ctrl {
  width: 52px;
  text-align: center;
  border: 1px solid #ced4da;
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 14px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #e9ecef;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}

.page-btn:hover:not(:disabled) {
  background: #c8d3df;
}

.page-btn.active {
  background: #1e3a7b;
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-input {
  flex: 1;
  height: 42px;
  border-radius: 6px;
}

/* Search container spacing */
.search-container {
  margin-bottom: 10px;
}

.search-btn {
  width: 130px;
  height: 42px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

/* Modal backdrop */
.hdsd-modal-backdrop {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.hdsd-modal-box {
  background: #fff;
  border-radius: 4px;
  width: 50rem;
  max-width: 95%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.hdsd-modal-hdr {
  background: #e9eff5;
  color: #1e3a7b;
  padding: 13px 18px;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hdsd-modal-close {
  font-size: 22px;
  cursor: pointer;
  opacity: 0.8;
}

.hdsd-modal-close:hover {
  opacity: 1;
}

.hdsd-modal-body {
  padding: 20px 22px 8px;
}

.hdsd-modal-ftr {
  padding: 12px 22px 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid #e9ecef;
}

/* Note box */
.hdsd-note {
  font-size: 12.5px;
  color: #555;
  background: #f5f7fb;
  border-left: 3px solid #1e3a7b;
  padding: 8px 10px;
  border-radius: 0 4px 4px 0;
  margin-top: 4px;
}

/* File row in edit modal */
.hdsd-file-row {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
}

.hdsd-file-label {
  font-size: 13px;
  color: #555;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-upload {
  background: #1e3a7b;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-upload:hover {
  background: #162e5e;
}

.btn-del-file {
  background: none;
  border: 1px solid #dc3545;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  color: #dc3545;
}

.btn-del-file:hover {
  background: #fff0f0;
}

/* ── New Add Modal Styles ── */
/* Horizontal form row: label left, control right */
.hdsd-form-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hdsd-form-label {
  flex: 0 0 140px;
  text-align: right;
  padding-top: 7px;
  font-size: 16px;
  color: #222;
  font-weight: 700;
}

.hdsd-form-control-wrap {
  flex: 1;
}

/* File upload table inside modal */
.hdsd-file-table {
  font-size: 13px;
  border: 1px solid #c8d5e6;
  table-layout: fixed;
  width: 100%;
}

.hdsd-file-table thead th {
  background: #fff;
  color: #000;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  font-size: 15px;
  padding: 7px 10px;
}

.hdsd-file-table tbody td {
  padding: 7px 8px;
  vertical-align: middle;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.hdsd-ftable-name {
  font-size: 13px;
  color: #444;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* filename cell */
.hdsd-ftable-cell {
  overflow: hidden;
  max-width: 0;
}

/* Icon buttons inside table */
.btn-icon-tbl {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  font-size: 1.1rem;
  color: #1e3a7b;
  border-radius: 3px;
}

.btn-icon-tbl:hover {
  background: #e8eef8;
}

.btn-del-color {
  color: #dc3545 !important;
}

.btn-del-color:hover {
  background: #fff0f0 !important;
}

/* Buttons – Đóng (red) and Lưu (dark blue) */
.btn-close-red {
  background: #dc3545;
  color: #fff;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
}

.btn-close-red:hover {
  background: #b02a37;
  color: #fff;
}

.btn-save-blue {
  background: #1e3a7b;
  color: #fff;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
}

.btn-save-blue:hover {
  background: #162e5e;
  color: #fff;
}