.document-tabs-wrapper {
  max-width: 100%;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.document-tabs-nav {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  background: white;
  overflow-x: auto;
}

.document-tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border: none;
  background: none;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  min-width: 0;
  flex-shrink: 0;
}

.document-tab-button:hover {
  color: #2563eb;
  background-color: #f8fafc;
}

.document-tab-button.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background-color: #f8fafc;
}

.document-tab-button .tab-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.document-tab-button .tab-text {
  min-width: 0;
}

.document-tabs-content {
  background: #ffffff;
  min-height: 400px;
}

.document-tab-content {
  display: none;
}

.document-tab-content.active {
  display: block;
}

.document-list-header {
  background: #f8fafc;
  padding: 20px 24px;
  border-bottom: 2px solid #2563eb;
  display: block;
  text-align: center;
}

.document-list-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.document-item {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: white;
  transition: background-color 0.2s ease;
  position: relative;
}

.document-item:hover {
  background-color: #f8fafc;
}

.document-title {
  flex: 1;
  min-width: 0;
}

.document-title h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: #1e293b;
  line-height: 1.5;
  word-wrap: break-word;
}

/* UPDATED: Document actions container */
.document-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 16px;
  position: relative;
  z-index: 5;
}

/* NEW: Separate containers for each button type */
.document-view-action {
  display: flex;
  align-items: center;
}

.document-download-action {
  display: flex;
  align-items: center;
}

/* Base button styles */
.document-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.document-btn:hover {
  /*opacity: 0.9;*/
  /*transform: translateY(-1px);*/
  /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
  text-decoration: none;
}

.document-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.document-btn:active {
  transform: translateY(0);
}

/* View button styles */
.document-view-btn {
  background-color: #2563eb;
  border: 1px solid #2563eb;
}

.document-view-btn:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* Download button styles */
.document-download-btn {
  background-color: #06b6d4;
  border: 1px solid #06b6d4;
}

/*.document-download-btn:hover {*/
/*  background-color: #0891b2;*/
/*  border-color: #0891b2;*/
/*  box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);*/
/*}*/

/* STYLING OPTIONS FOR SEPARATE CONTAINERS */

/* Style view action containers */
.document-view-action {
  /* You can add specific styling for view button containers */
  margin-right: 4px;
}

/* Style download action containers */
.document-download-action {
  /* You can add specific styling for download button containers */
  margin-left: 4px;
}

/* Example: Different backgrounds for button containers */
.document-view-action {
  background-color: rgba(37, 99, 235, 0.05);
  border-radius: 6px;
  padding: 2px;
}

.document-download-action {
  background-color: rgba(6, 182, 212, 0.05);
  border-radius: 6px;
  padding: 2px;
}

/* Example: Style specific button containers by position */
.document-view-action-tab-0-doc-0 {
  background-color: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
  padding: 4px;
}

.document-download-action-tab-0-doc-0 {
  background-color: rgba(78, 205, 196, 0.1);
  border-radius: 8px;
  padding: 4px;
}

/* Example: Add borders to button containers */
.document-view-action {
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.document-download-action {
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.document-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-top: 1px solid #e2e8f0;
}

.pagination-info {
  font-size: 14px;
  color: #64748b;
}

.pagination-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  background: white;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
  min-width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pagination-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8fafc;
}

.no-documents {
  padding: 40px 24px;
  text-align: center;
  color: #64748b;
  background: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .document-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .document-tab-button {
    padding: 12px 16px;
    font-size: 13px;
  }
  .document-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

  .document-pagination {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .document-list-header {
    padding: 16px;
  }

  .document-list-header h3 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .document-tab-button {
    padding: 10px 12px;
    font-size: 12px;
  }

  .document-tab-button .tab-text {
    display: none;
  }

  .document-tab-button .tab-icon {
    font-size: 18px;
  }

  .document-btn {
    padding: 6px 10px;
    font-size: 10px;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 36px;
    height: 32px;
  }

  .document-list-header {
    padding: 12px;
  }

  .document-list-header h3 {
    font-size: 14px;
  }

  /* Stack button containers vertically on very small screens */
  .document-actions {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .document-view-action,
  .document-download-action {
    width: 100%;
  }

  .document-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Hide JSON data scripts */
.tab-documents-data {
  display: none;
}