/* /var/www/braventa-dev/app/static/css/styles.css */

/* ───────────────── TABULATOR OVERRIDES ───────────────── */

.tabulator .tabulator-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9 !important;
}

.tabulator {
  overflow: unset !important;
}

.tabulator-tableholder {
  max-height: 360px !important;
}

/* Force Google autocomplete widgets to light mode */
gmp-place-autocomplete,
gmp-place-autocomplete * {
  color-scheme: light !important;
}

gmp-place-autocomplete {
  height: 42px;
}

/* Read-only inputs look disabled but still visible */
input[readonly]:not(.flatpickr-input),
textarea[readonly],
select[readonly] {
  background-color: #f3f4f6;  /* gray-100 */
  color: #9ca3af;             /* gray-400 */
  opacity: 0.7;
}

/* ───────────────── DATATABLES (GLOBAL) ───────────────── */

/* Wrapper spacing / font */
.dataTables_wrapper {
  font-size: 0.875rem; /* text-sm */
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.25rem;
}

/* Search box */
.dataTables_wrapper .dataTables_filter input {
  margin-left: 0.4rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db; /* gray-300 */
  font-size: 0.75rem;
}

/* Info text (left) */
.dataTables_wrapper .dataTables_info {
  padding-top: 0.5rem;
  padding-left: 0.25rem;
  font-size: 0.75rem;       /* text-xs */
  color: #6b7280;           /* gray-500 */
}

/* Pagination container (right) */
.dataTables_wrapper .dataTables_paginate {
  padding-top: 0.5rem;
  text-align: right;
}

/* Pagination buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  margin-left: 0.2rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;/* gray-200 */
  background-color: #ffffff;
  font-size: 0.75rem;       /* text-xs */
  color: #4b5563 !important;/* gray-600 */
  cursor: pointer;
  background-image: none !important;
}

/* Current page */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  border-color: #3b82f6;    /* blue-500 */
  background-color: #eff6ff;/* blue-50 */
  color: #1d4ed8 !important;/* blue-700 */
}

/* Hover */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background-color: #f3f4f6;/* gray-100 */
  border-color: #d1d5db;    /* gray-300 */
}

/* Disabled buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: default;
}

/* Remove outline feio */
.dataTables_wrapper .dataTables_paginate .paginate_button:focus {
  outline: none;
  box-shadow: 0 0 0 1px #bfdbfe; /* blue-200 */
}

/* ───────────── DATATABLES BUTTONS (CSV / PDF) ───────────── */

.dataTables_wrapper .dt-buttons {
  margin-bottom: 0.35rem;         /* afasta dos outros elementos */
}

/* Estilo dos botões CSV / PDF */
.dataTables_wrapper .dt-buttons .dt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.30rem 0.65rem;
  margin-right: 0.35rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;      /* gray-200 */
  background-color: #f9fafb;      /* gray-50 */
  background-image: none !important;
  font-size: 0.75rem;             /* text-xs */
  font-weight: 500;
  color: #374151;                 /* gray-700 */
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
}

/* CSV = estilo neutro, PDF = levemente “chamativo” */
.dataTables_wrapper .dt-buttons .dt-button:nth-child(1) {
  /* CSV */
}

.dataTables_wrapper .dt-buttons .dt-button:nth-child(2) {
  /* PDF: leve destaque lilás */
  border-color: #c4b5fd;          /* purple-300 */
  background-color: #f5f3ff;      /* purple-50 */
  color: #5b21b6;                 /* purple-800 */
}

/* Hover */
.dataTables_wrapper .dt-buttons .dt-button:hover {
  background-color: #e5e7eb;      /* gray-200 */
  border-color: #d1d5db;
}

/* Hover PDF */
.dataTables_wrapper .dt-buttons .dt-button:nth-child(2):hover {
  background-color: #ede9fe;      /* purple-100 */
  border-color: #a78bfa;          /* purple-400 */
}

/* Active / click */
.dataTables_wrapper .dt-buttons .dt-button:active {
  transform: translateY(0.5px);
}

/* Focus */
.dataTables_wrapper .dt-buttons .dt-button:focus {
  outline: none;
  box-shadow: 0 0 0 1px #bfdbfe;  /* blue-200 */
}

.choices__inner  {
  background-color: initial !important;
}

.choices__inner,
.choices__list--single .choices__item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.choices__list {
  z-index: 2 !important;
}

.iti {
  width: 100%;
}

.choices.is-invalid .choices__inner {
  border-color: #dc2626 !important; /* red-600 */
  box-shadow: 0 0 0 1px #dc2626 !important;
}

select[readonly] {
    pointer-events: none;
    background-color: #f3f4f6;
    color: #6b7280;
}

.awesomplete {
  display: inherit !important;
}