/* Customs */

.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-results__option--disabled {
  color: #ccc;
}

/* Miscellaneous */

.separator-slash {
  font-weight: bold;
  height: 100%;
  color: hsl(0, 0%, 40%);
  margin-inline: 0.2rem;
}

button[type="submit"] .spinner-border {
  display: none !important;
}

button[type="submit"]:disabled .spinner-border {
  display: inline-block !important;
}

.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-results__option--disabled {
  color: #ccc;
}

.select2-container--default .select2-selection--single {
  border: 1px solid #dee2e6;
}

.select2-container--default .select2-selection--single {
  height: 37px !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  margin-top: 3px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  padding-left: 10px;
}

.select2-container--default
  .select2-search--dropdown
  .select2-search__field:focus-visible {
  border-color: #aaa !important;
  outline: 1px solid #dee2e6;
  border-radius: 4px;
}

.select2-results {
  font-size: 14px !important;
}
.select2-selection__choice {
  width: 95% !important;
}

.form-control::placeholder {
  color: #bfc4c9 !important;
  font-size: 14px;
}

.select2-container--default .select2-selection--multiple,
.select2-container--default.select2-container--focus
  .select2-selection--multiple {
  border: 1px solid #dee2e6;
}

.select2-container--default
  .select2-selection--multiple
  .select2-selection__choice {
  margin-top: 10px;
  margin-left: 10px;
}

.dropdown-divider {
  padding-block: 0 !important;
}

/* ============================================================
   Table Component — ViMental
   Uses !important sparingly to override Bootstrap's high-
   specificity selectors like .table > :not(caption) > * > *
   ============================================================ */

.vm-table-wrapper {
  background: var(--vm-bg-card, #fff);
  border-radius: 0.5rem;
  box-shadow: var(--vm-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
  overflow: hidden;
}

.vm-table-wrapper .table-responsive {
  margin-bottom: 0;
}

table.table.vm-table {
  font-size: 13.5px;
  margin-bottom: 0;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: transparent;
  --bs-table-bg: transparent;
  border-color: transparent;
}

/* Override Bootstrap .table > :not(caption) > * > *
   Header: neutro calido con acento secundario (oro rosa)
   Hover: verde suave (primario) para indicar interactividad
   Esto equilibra la paleta: verde = acciones, rosa = superficies */
table.table.vm-table > thead > tr > th {
  background: var(--vm-secondary-light, #F7EFEA) !important;
  color: var(--vm-secondary-dark, #A8745E) !important;
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.65rem 0.75rem;
  border-bottom: 2px solid var(--vm-secondary, #C99781) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  white-space: nowrap;
  box-shadow: none !important;
}

table.table.vm-table > tbody > tr > td {
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid var(--vm-border, #E2E8F0) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  color: var(--vm-text, #2D3748);
  background: transparent;
  box-shadow: none !important;
}

table.table.vm-table > tbody > tr:last-child > td {
  border-bottom-color: transparent !important;
}

table.table.vm-table > tbody > tr:hover > td {
  background: var(--vm-secondary-light, #F7EFEA) !important;
  transition: background 0.15s ease;
}

table.table.vm-table .vm-row-number {
  color: var(--vm-text-muted, #718096);
  font-weight: 500;
  font-size: 12px;
}

table.table.vm-table .vm-actions-btn {
  border: 1px solid var(--vm-border, #E2E8F0);
  background: var(--vm-bg-card, #fff);
  border-radius: 0.375rem;
  padding: 0.15rem 0.5rem;
  transition: all 0.15s ease;
  line-height: 1;
}

table.table.vm-table .vm-actions-btn:hover {
  background: var(--vm-primary-light, #E8F4EA);
  border-color: var(--vm-primary, #7BBA82);
}

table.table.vm-table .vm-empty-state {
  text-align: center;
  padding: 2rem 1rem !important;
  color: var(--vm-text-muted, #718096);
  font-style: italic;
}

table.table.vm-table caption {
  caption-side: top;
  padding: 0.6rem 0.75rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--vm-text-muted, #718096);
}

@media (min-width: 576px) {
  table.table.vm-table {
    font-size: 14px;
  }
  table.table.vm-table > thead > tr > th {
    font-size: 13px;
  }
}

/* ============================================================
   Detail Card — ViMental (modal details, info displays)
   ============================================================ */

.vm-detail-card {
  padding: 0.6rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--vm-bg-page, #FAFAFA);
  border: 1px solid var(--vm-border, #E2E8F0);
  height: 100%;
}

.vm-detail-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--vm-text-muted, #718096);
  margin-bottom: 0.2rem;
}

.vm-detail-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--vm-text, #2D3748);
}

.select2-dropdown {
  z-index: 10000 !important;
}

.dropdown-menu .dropdown-item i {
  margin-right: 3px !important;
}

.fs-xs {
  font-size: 13px !important;
}

form.was-validated
  select:valid
  ~ .select2
  .select2-selection.select2-selection--single {
  border: 1px solid #198754 !important;
}

form.was-validated select:valid ~ .select2 b[role="presentation"] {
  border-color: #198754 transparent transparent transparent !important;
}

form.was-validated
  select:invalid
  ~ .select2
  .select2-selection.select2-selection--single {
  border: 1px solid #dc3545 !important;
}

form.was-validated select:invalid ~ .select2 b[role="presentation"] {
  border-color: #dc3545 transparent transparent transparent !important;
}

.was-validated .form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: var(--bs-form-invalid-border-color) !important;
  padding-right: calc(1.5em + 0.75rem) !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right calc(0.375em + 0.1875rem) center !important;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
}

.is-valid ~ p.text-start.text-danger {
  display: none;
}

.custom-xl-size {
  width: 90% !important;
  max-width: 1140px !important;
  margin-inline: auto;
}

.dropdown-menu > li > * {
  font-size: 14px;
  color: hsl(210deg 10.81% 14.51%);
}

.dropdown-menu button:first-child:active {
  border-color: transparent !important;
}

.dropdown-menu {
  padding-block: 0;
}

.dropdown-menu li * {
  font-size: 13px;
  padding-block: 0.2rem;
}

.dropdown-menu li:hover {
  background: #8f8f8f1f;
}
