/* Upload Page Styles */

/* --- Layout --- */
.upload-panel {
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.step-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --- Document Table --- */
.documents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.documents-table th,
.documents-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--glass-text);
}

.documents-table th {
  font-weight: 600;
  background: rgba(255,255,255,0.03);
}

.upload-feedback {
  min-height: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Form Elements --- */
.document-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.document-form input,
.document-form select,
.document-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.document-form input:focus,
.document-form select:focus,
.document-form textarea:focus {
  border-color: var(--accent-1);
  background: rgba(255,255,255,0.1);
}

/* Fix Bootstrap overrides in Modals (Dialogs) */
.document-form .form-control,
.document-form .glass-input {
  color: #fff !important;
  background-color: rgba(255,255,255,0.06) !important;
}

.document-form .form-control:focus,
.document-form .glass-input:focus {
  color: #fff !important;
  background-color: rgba(255,255,255,0.1) !important;
  border-color: var(--accent-1);
  box-shadow: none;
}

/* --- File Drop Area --- */
.file-drop-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: center;
}

.file-drop-area:hover,
.file-drop-area.highlight {
  border-color: var(--accent-1);
  background: rgba(14, 165, 233, 0.05);
}

.fake-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.5rem;
  pointer-events: none;
}

.file-msg {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.file-input {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

/* --- Preview List --- */
.preview-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.chunk-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s;
}

.chunk-card:focus-within {
  border-color: var(--accent-1);
}

.chunk-card input,
.chunk-card textarea {
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.2) !important;
  color: var(--glass-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.chunk-card textarea {
  resize: vertical;
}

.chunk-card label {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* --- Scrollbar for Preview --- */
.glass-scroll::-webkit-scrollbar {
  width: 6px;
}
.glass-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.glass-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* --- Utils --- */
.text-danger { color: #f87171 !important; }
.text-success { color: #4ade80 !important; }
.text-info { color: #38bdf8 !important; }

/* --- Badge Styles --- */
#chunk-count-badge {
  color: #fff !important;
  font-weight: 500;
}


.panel.glass-panel{
  margin-top: 1rem;
}
