body {
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #fffdec 23%,
    #ffffff 46%,
    #ffeeee 79%,
    #ffffe3 99%
  );
}

/* Example prompts */
.example-prompts-container {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
}

.example-prompt {
  width: 340px;
  height: 13vh;
  min-height: 120px;
  border: 1px solid #8A8A8A;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  opacity: 0.5;
}

.typing-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #8A8A8A;
}

.typing-cursor::after {
  content: '|';
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@media (max-width: 720px) {
  .example-prompts-container {
    flex-direction: column;
    align-items: center;
  }
}
/* Chat agent styles */
#chat-messages {
  height: 50vh;
  overflow-y: auto;
  padding: 10px;
}

.match-suggestions-container {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 15px;
  max-width: 95%;
}

.match-suggestions-table {
  font-size: 1rem;
}

.interactive-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.interactive-option {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.interactive-option:hover {
  background-color: #007bff;
  color: white;
}
.interactive-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.message {
  margin-bottom: 15px;
  border-radius: 8px;
  padding: 12px 15px;
  max-width: 85%;
  word-wrap: break-word;
}

.message-user {
  background-color: #e9ecef;
  margin-left: auto;
  text-align: left;
}

.message-assistant {
  background-color: transparent;
  margin-right: auto;
  color: #686868;
  text-align: left;
  color:black;
}

.message-assistant > p{
  margin: 0 !important;
  
}

.message-suggestion {
  cursor: pointer;
  transition: background-color 0.2s;
  padding: 5px 10px;
  margin: 3px 0;
  border-radius: 5px;
  display: inline-block;
  background-color: #f0f0f0;
  text-align: left;
}

.message-suggestion:hover {
  background-color: #e0e0e0;
}

/* File drop zone */
.highlight-drop {
  border: 2px dashed #0d6efd !important;
  background-color: rgba(13, 110, 253, 0.05);
}

/* Tabulator custom styles */
.tabulator-row.matched-row {
  background-color: rgba(25, 135, 84, 0.1);
}

.tabulator-cell.matched-cell {
  font-weight: bold;
}

.tabulator-cell.overwritten-cell {
  background-color: rgba(255, 193, 7, 0.1);
  border-left: 3px solid rgb(255, 193, 7);
}

.tabulator-cell.added-cell {
  background-color: rgba(13, 110, 253, 0.1);
}

/* Animation for buttons/suggestions */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse-animation {
  animation: pulse 1s infinite;
}

/* Responsive layout */
@media (max-width: 768px) {
  #chat-section,
  #preview-section {
    width: 100%;
    max-width: 100%;
  }

  .footer{
    display: none !important;
  }

  .card {
    height: auto !important;
    margin-bottom: 15px;
  }

  #chat-messages {
    height: 50vh;
  }

  #preview-section .card-body {
    padding: 10px;
  }
}

#config-section {
  background: transparent;
  border: none;
  box-shadow: none;
}

#config-section .card-header {
  background: transparent;
  border: none;
  padding-bottom: 0;
}

#config-section .card-body {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-top: 0.5rem;
}

/* file section */
#file-section {
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 0px !important;
}

#file-section .card-header {
  background: transparent;
  border: none;
  padding-bottom: 0;
  height: 60px;
  max-height: 60px
  width: calc(100% - 300px);
}

/* nav tabs */
.nav-tabs {
  background: none;
  border-bottom: none;
  margin-bottom: 15px;
}

#config-section .nav-tabs .nav-link {
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0 30px;
  min-height: 34px;
  font-size: 14px;
  border: 1px solid  #A3A3A3;
  color:  #A3A3A3
}

#config-section .nav-tabs .nav-link.active {
  background-color: #29b382;
  border-color: #e9ecef #e9ecef #fff;
  color: white;
}

.nav-tabs .nav-link {
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border: 1px solid #4d4d4a;
}

.nav-tabs .nav-link.active {
  background-color: #29b382;
  border-color: #e9ecef #e9ecef #fff;
  color: white;
}

#add-column-btn,
#add-overwrite-btn{
  background-color: #29b382 !important;
  border-color: #e9ecef #e9ecef #fff !important;
  color: white !important;
  border-radius: 20px;
}

#add-column-btn:hover,
#add-overwrite-btn:hover{
  background-color: #139165 !important;
}

.match-suggestions-table > thead {
  display: none !important;
}

.btn-primary {
  background-color: black;
  border-color: #e9ecef #e9ecef #fff;
  color: white;
  min-width: 30px;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: black;
  transform: translateY(-1px);
}

.bg-success,
.bg-warning,
.bg-primary {
  color: white;
}

/* tabulator styling */

.tabulator-col.tabulator-sortable {
  background-color: transparent !important;
  color: #29b382;
  font-weight: bold;
}
.tabulator .tabulator-header {
  background-color: transparent !important;
}

.tabulator-row.tabulator-selectable.tabulator-row-odd {
  background: transparent !important;
}

.tabulator-row.tabulator-row-even {
  background-color: transparent !important;
}

.tabulator {
  width: 100% !important;
  max-width: none !important;
  background: transparent !important;
  border: none !important;
}

#blend-preview,
#file1-preview,
#file2-preview {
  background: white;
  overflow-y: hidden !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

.btn-pulse {
  animation: pulse 1.5s infinite;
}

.highlight-pulse {
  animation: pulse 1.5s;
  border: 2px solid #0d6efd;
  border-radius: 5px;
}

.card-body.collapsed {
  height: 0 !important;
}

/* Column visibility menu styles */
#column-visibility-menu {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 9999;
  min-width: 250px;
}

.column-visibility-item {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.column-visibility-item:hover {
  background-color: #f8f9fa;
}

.column-visibility-checkbox {
  margin-right: 0.5rem;
}

#column-visibility-btn {
  position: relative;
}

#column-visibility-menu .dropdown-header {
  font-weight: 600;
  color: #495057;
  padding: 0.5rem 1rem;
  background-color: #f8f9fa;
  text-align: center;
}

#column-visibility-menu .dropdown-divider {
  margin: 0;
}

/* Removed All button styles - no longer needed */

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  #column-visibility-menu {
    background: #FFFFFF; /*9737723*/
    border-color: #333;
  }

  .column-visibility-item:hover {
    background-color: #9d9d9d;
  }

  #column-visibility-menu .dropdown-header {
    background-color: #9d9d9d;
    color: #ffffff;
  }
}
.card-body:empty {
  display: none;
}

#upload-btn,
#send-btn,
.nav-tabs .nav-link {
  box-shadow: 3px 3px 20px 2px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 1px;
  font-style: normal;
  font-weight: 500;
  font-size: 18px;
  line-height: 22px;
  text-align: center;
  letter-spacing: 1px;
  margin: 0 5px;
  float: right;
  min-height: 40px;
  padding: 0 30px;
}

#upload-btn,
.nav-tabs .nav-link.active {
  background: linear-gradient(94.76deg, #29b382 -10.66%, #3a89de 139.11%);
  color: #ffffff;
}

#send-btn{
  position: absolute;
  right: 5px;
  bottom: 5px;
  background-color: black;
  height: 32px;
  width: auto;
  padding: 6px 12px;
  z-index: 10;
}

#input-group {
  position: relative;
  background: var(--window-bg);
  border-radius: 8px;
  padding: 16px;
  /* Create a "cutout" for the gradient border */
  isolation: isolate;
  border:1px solid black;
}

#user-input {
  background: none;
  padding-right: 50px; /* Account for button width + margin */
}

/*#input-group::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(94.76deg, #29b382 -10.66%, #3a89de 139.11%);
  background:black
  border-radius: 8px;
  z-index: -1;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px; 
}
*/

@media (min-width: 768px) {
  html,
  body {
    height: 100%;
    margin: 0;
  }

  .page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
  }

  .page-wrapper {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .page-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  #chat-section {
    overflow: hidden;
    border-right: 1px solid #111111;
    padding: 0px !important;
    margin: 0px !important;
    width: 30% !important;
  }

  #chat-section .card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  #chat-section .card-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: transparent;
  }
  footer.footer.footer-transparent.d-print-none {
    margin: 0px !important;
    padding: 0px;
    background: #F5F5F7 !important;
  }

  .footer{
    display: none !important;
  }

  #preview-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    height: 100vh;
    width: 70% !important;
    padding:0px !important;
    margin-top:0px !important;
  }

  #config-section {
    flex-shrink: 0; /* asegura que mantenga su altura natural */
  }

  #file-section .card-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /*height: calc(100vh - 60px);*/
    height: 100vh;
    padding: 0px;
    border-radius: 0px;
    top: -45px;
  }

  #file-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
  }

  #file1-preview,
  #file2-preview,
  #blend-preview {
    flex: 1;
    min-height: 0; /* necesario para que Tabulator calcule bien el scroll */
  }

  #chat-section table td {
    padding: 5px;
  }

  .card-header{
    padding-top: 30px !important;
  }
}

#input-group.highlight-drop {
  background-color: rgba(0, 123, 255, 0.1);
  border: 2px dashed #007bff;
}

#query-results-area > .d-flex.justify-content-between.mb-3 {
  display: none !important;
}

/* Tab selectors styling - Results and Report tabs */
#main-nav-tabs .nav-link {
  /* Comunes para ambos estados */
  font-weight: bold;
  font-size: 13pt;
  border-radius: 10px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;

  /* Estado no activo */
  border: 1px solid #505050;
  color: #505050;
  background: transparent;
  box-shadow: none;
}

#main-nav-tabs .nav-link.active {
  background: #000000;
  color: #ffffff;
  box-shadow: -3px 4px 4px rgba(200, 200, 200, 0.4);
  border: 1px solid #000000;
}

/* Sources Sidebar */
.sources-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 20vw;
  min-width:360px;
  background-color: white;
  border-right: 1px solid #dee2e6;
  z-index: 1040; /* Below navbar but above content */
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  transform: translateX(-100%);
}

.sources-sidebar.show {
  transform: translateX(0);
}

.sources-section,
.tablenders-section {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.sources-section {
  border-bottom: 1px solid #dee2e6;
}

.sidebar-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sources-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.source-item {
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  border-left: 4px solid #29b382;
}

.source-item .source-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.source-item .source-details {
  font-size: 0.75rem;
  color: #6c757d;
}

.recent-tablenders {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tablender-item {
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tablender-item:hover {
  background-color: #e9ecef;
}

.tablender-item .tablender-name {
  font-weight: 500;
  color: #212529;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.tablender-item .tablender-meta {
  font-size: 0.75rem;
  color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .sources-sidebar {
    width: 50%; /* Wider on smaller screens */
  }
}

@media (max-width: 767.98px) {
  .sources-sidebar {
    width: 80%; /* Even wider on mobile */
  }
}

/* Adjust main content when sidebar is visible */
.sources-sidebar.show ~ .app-view {
  margin-left: 33.333333% !important;
  transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
  .sources-sidebar.show ~ .app-view {
    margin-left: 50% !important;
  }
}

@media (max-width: 767.98px) {
  .sources-sidebar.show ~ .app-view {
    margin-left: 80% !important;
  }
}

/* Sidebar Control Buttons */
#sidebar-close-btn {
  background: none;
  border: none;
  color: #6c757d;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

#sidebar-close-btn:hover {
  color: #495057;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.sidebar-show-icon {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1050;
  background-color: transparent;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 8px;
  color: #6c757d;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-show-icon:hover {
  color: #495057;
  background-color: #f8f9fa;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

#preview-tab, #preview-area, #blend-preview {
  height: calc(100% - 25px) !important;
}

.tabulator-header-filter{
  display:none !important;
}

.tabulator .tabulator-header .tabulator-col, .tabulator-row .tabulator-cell {
  /* max-width removed to allow column resizing beyond default width */
}

.tabulator .tabulator-header {
  max-height: 50px;
}

#download-controls > .btn-group > button {
    background: #000000;
    color: #ffffff;
    box-shadow: -3px 4px 4px rgba(200, 200, 200, 0.4);
    border: 1px solid #000000;
    font-size: 14px;
    font-weight: bold;
    font-size: 13pt;
    border-radius: 10px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border: 1px solid #505050;
    /* color: #505050; */
    /* background: transparent; */
}

.btn-outline-primary {
  background: #000000;
  color: #ffffff;
  box-shadow: -3px 4px 4px rgba(200, 200, 200, 0.4);
  border: 1px solid #000000;
  font-weight: bold;
  font-size: 13pt;
  border-radius: 10px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  display: inline;
}
