/* =========================================================
   AGriID - Quản lý trọng số hành vi (INDEX + NEW)
   Chuẩn cấu trúc .behavior-weight-page .class_con (không nested)
   ========================================================= */


.behavior-weight-page {
  background: #ffffff;
  padding-bottom: 24px;
}

/* ======= HEADER ======= */
.behavior-weight-page .cs-title-header {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.behavior-weight-page .cs-title-header i {
  color: #16a34a;
  font-size: 18px;
  margin-right: 6px;
}

/* ======= GRID & CARD ======= */
.behavior-weight-page .behavior-grid {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
}

.behavior-weight-page .behavior-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 24px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s ease;
  margin: 8px;
}

.behavior-weight-page .behavior-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.behavior-weight-page .behavior-card .card-header {
  font-weight: 600;
  color: #111827;
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.behavior-weight-page .behavior-card .card-header i {
  color: #16a34a;
  font-size: 15px;
}

.behavior-weight-page .behavior-card .card-tags {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.behavior-weight-page .behavior-card .tag-item {
  border: 1px solid #16a34a;
  /* color: #14532d; */
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  background: #EBF9F2;
}

.behavior-weight-page .behavior-card .btn.btn-green.full {
  background: #16a34a;
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  width: 100%;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.behavior-weight-page .behavior-card .btn.btn-green.full:hover {
  background: #128c3f;
}

/* ======= FORM SELECT ======= */
.behavior-weight-page .cs-button-create {
  margin: 20px 0px -10px 8px;
}

.behavior-weight-form .behavior-select {
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  height: 40px;
  font-size: 14px;
  color: #111827;
}

/* ======= TABLE ======= */
.behavior-weight-form .behavior-table th {
  background: #f3f4f6;
  color: #19A35C;
  font-weight: 600;
  padding: 12px 16px;
}

.behavior-weight-form .behavior-table td {
  vertical-align: middle;
  padding: 10px 16px;
}

.behavior-weight-form .behavior-table .form-control {
  width: 80px;
  margin: auto;
  text-align: center;
  height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.behavior-weight-form .btn-remove-row {
  color: #dc2626;
  font-size: 15px;
}

.behavior-weight-form .btn-remove-row:hover {
  color: #b91c1c;
}
/* ======= BUTTON FIX ======= */
.behavior-weight-form {
  background: #ffffff;
  max-width: 800px; /* 👈 Giới hạn chiều rộng tối đa */
  margin: 40px auto; /* 👈 Canh giữa theo chiều ngang */
}

.behavior-weight-form .form-group.text-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.behavior-weight-form .form-group.text-right label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
  color: #111827;
}

.behavior-weight-form .form-group.text-right .btn {
  min-width: 100px;
  height: 38px;
  border-radius: 6px;
  font-size: 14px;
  padding: 6px 14px;
}

.behavior-weight-form .form-group.text-right .btn-green {
  background: #22c55e;
  color: #fff;
  border: 1px solid #16a34a;
}

.behavior-weight-form .form-group.text-right .btn-green:hover {
  background: #16a34a;
}

.behavior-weight-form .form-group.text-right .btn-default {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  color: #374151;
}

.behavior-weight-form .form-group.text-right .btn-default:hover {
  background: #e5e7eb;
}

.behavior-weight-form .m-t-15 {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden; /* 🔥 thêm dòng này */
}/* ==== CUSTOM CHECKBOX ==== */
.behavior-weight-form .td-checkbox {
  position: relative;
  padding-right: 28px; /* để tick nằm bên phải */
  cursor: pointer;
  font-size: 15px;
  user-select: none;
  display: inline-flex;
  align-items: center;
  color: #111827;
}

/* Ẩn checkbox gốc */
.behavior-weight-form .td-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Tạo ô tick bên phải */
.behavior-weight-form .td-checkbox .checkmark {
  position: absolute;
  right: 0;
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #9ca3af;
  border-radius: 4px;
  transition: all 0.2s ease;
}

/* Khi hover */
.behavior-weight-form .td-checkbox:hover .checkmark {
  border-color: #16a34a;
}

/* Khi được chọn */
.behavior-weight-form .td-checkbox input:checked ~ .checkmark {
  background-color: #16a34a;
  border-color: #16a34a;
}

/* Vẽ dấu tick */
.behavior-weight-form .td-checkbox .checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.behavior-weight-form .td-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.behavior-weight-form .td-checkbox .checkmark:after {
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
