/* Repository Page - Modern Professional Styling */

:root {
  --repoTab-primary-color: #2464eb;
  --repoTab-primary-hover: #1b4db9;
  --repoTab-success-color: #22c55e;
  --repoTab-danger-color: #ef4444;
  --repoTab-warning-color: #f59e0b;
  --repoTab-info-color: #3abff8;
  --repoTab-dark-color: #1e293b;
  --repoTab-light-color: #f8fafc;
  --repoTab-border-color: #e2e8f0;
  --repoTab-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --repoTab-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --repoTab-transition-speed: 0.2s;
}

/* Repository Container */
.repoTab-repository-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Toolbar */
.repoTab-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 1.25rem;
  border-radius: 0.75rem;
  box-shadow: var(--repoTab-card-shadow);
  margin-bottom: 1.5rem;
  border: 1px solid var(--repoTab-border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.repoTab-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.repoTab-toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.repoTab-search-container {
  min-width: 800px;
  margin-left: 1rem;
}

.repoTab-stats-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.repoTab-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.repoTab-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--repoTab-primary-color);
  line-height: 1;
}

.repoTab-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-top: 0.25rem;
}

.repoTab-stat-divider {
  width: 1px;
  height: 2rem;
  background-color: var(--repoTab-border-color);
}

/* Table Container */
.repoTab-scripts-table-container {
  margin-bottom: 2rem;
}

.repoTab-table-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: var(--repoTab-card-shadow);
  border: 1px solid var(--repoTab-border-color);
  overflow: hidden;
}

.repoTab-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background-color: var(--repoTab-light-color);
  border-bottom: 1px solid var(--repoTab-border-color);
}

.repoTab-table-title {
  color: var(--repoTab-dark-color);
  font-weight: 600;
  display: flex;
  align-items: center;
}

/* Table Styling */
.repoTab-table {
  margin-bottom: 0;
  background-color: white;
}

.repoTab-table thead th {
  background-color: #f8fafc;
  border-bottom: 2px solid var(--repoTab-border-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
  padding: 1rem;
  color: #64748b;
  border-top: none;
  position: sticky;
  top: 0;
  z-index: 2;
}

.repoTab-table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.repoTab-table tbody tr {
  transition: background-color var(--repoTab-transition-speed) ease;
}

.repoTab-table tbody tr:hover {
  background-color: rgba(36, 100, 235, 0.02);
}

/* Sortable Headers */
.repoTab-sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--repoTab-transition-speed) ease;
  position: relative;
}

.repoTab-sortable:hover {
  color: var(--repoTab-primary-color);
}

.repoTab-sortable span {
  margin-right: 0.5rem;
}

.repoTab-sort-icon {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: opacity var(--repoTab-transition-speed) ease;
}

.repoTab-sortable:hover .repoTab-sort-icon {
  opacity: 1;
}

.repoTab-sort-icon.fa-sort-up,
.repoTab-sort-icon.fa-sort-down {
  opacity: 1;
  color: var(--repoTab-primary-color);
}

/* Script Row Elements */
.repoTab-script-row {
  cursor: pointer;
}

.repoTab-script-name-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.repoTab-script-name {
  font-weight: 600;
  color: var(--repoTab-dark-color);
  cursor: pointer;
  transition: color var(--repoTab-transition-speed) ease;
  text-decoration: none;
}

.repoTab-script-name:hover {
  color: var(--repoTab-primary-color);
  text-decoration: underline;
}

.repoTab-date-cell {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.repoTab-date-primary {
  font-weight: 500;
  color: var(--repoTab-dark-color);
  font-size: 0.875rem;
}

.repoTab-date-secondary {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Action Buttons */
.repoTab-action-buttons {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
}

.repoTab-action-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  transition: all var(--repoTab-transition-speed) ease;
  font-size: 0.875rem;
}

.repoTab-action-btn:hover {
  transform: translateY(-1px);
}

.repoTab-action-btn.btn-outline-primary:hover {
  background-color: var(--repoTab-primary-color);
  border-color: var(--repoTab-primary-color);
}

.repoTab-action-btn.btn-outline-secondary:hover {
  background-color: #64748b;
  border-color: #64748b;
}

.repoTab-action-btn.btn-outline-info:hover {
  background-color: var(--repoTab-info-color);
  border-color: var(--repoTab-info-color);
}

.repoTab-action-btn.btn-outline-danger:hover {
  background-color: var(--repoTab-danger-color);
  border-color: var(--repoTab-danger-color);
}

/* Empty State */
.repoTab-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}

.repoTab-empty-icon {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.repoTab-empty-state h4 {
  color: var(--repoTab-dark-color);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.repoTab-empty-state p {
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.repoTab-btn {
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all var(--repoTab-transition-speed) ease;
  border-width: 1px;
}

.repoTab-btn-primary {
  background-color: var(--repoTab-primary-color);
  border-color: var(--repoTab-primary-color);
}

.repoTab-btn-primary:hover {
  background-color: var(--repoTab-primary-hover);
  border-color: var(--repoTab-primary-hover);
  transform: translateY(-1px);
}

.repoTab-btn-outline-secondary {
  color: #64748b;
  border-color: #d1d5db;
}

.repoTab-btn-outline-secondary:hover {
  background-color: #64748b;
  border-color: #64748b;
  color: white;
  transform: translateY(-1px);
}

/* Input Groups */
.repoTab-input-group .input-group-text {
  background-color: #f8fafc;
  border-color: var(--repoTab-border-color);
  color: #64748b;
}

.repoTab-input-group .form-control {
  border-color: var(--repoTab-border-color);
}

.repoTab-input-group .form-control:focus {
  border-color: var(--repoTab-primary-color);
  box-shadow: 0 0 0 0.2rem rgba(36, 100, 235, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
  .repoTab-repository-container {
    padding: 1rem;
  }

  .repoTab-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .repoTab-toolbar-left,
  .repoTab-toolbar-right {
    width: 100%;
    justify-content: center;
  }

  .repoTab-search-container {
    min-width: auto;
    width: 100%;
    margin-left: 0;
  }

  .repoTab-table-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .repoTab-action-buttons {
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .repoTab-action-buttons {
    flex-direction: column;
    gap: 0.25rem;
  }

  .repoTab-action-btn {
    width: 100%;
    height: auto;
    padding: 0.5rem;
  }
}