/* Calculator Specific Styles */

.container-fluid {
  max-width: 100%;
  padding: 1rem;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  text-decoration: none;
  color: #666;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-link:hover {
  background: #f0f0f0;
  color: #333;
}

.nav-link.active {
  background: #0066cc;
  color: white;
}

/* Calculator Filters */
.calc-filters {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-col label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #333;
}

.filter-col select,
.filter-col input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.875rem;
}

.filter-col select:focus,
.filter-col input:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.btn-apply {
  width: 100%;
  padding: 0.5rem 1rem;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-apply:hover {
  background: #0052a3;
}

/* Calculator Table */
.calc-table-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

.table-wrapper {
  overflow-x: auto;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.calc-table thead {
  background: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 10;
}

.calc-table th {
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.calc-table th:hover {
  background: #e9ecef;
}

.calc-table th[data-sort]::after {
  content: ' ⇅';
  opacity: 0.3;
}

.calc-table th[data-sort].sort-asc::after {
  content: ' ↑';
  opacity: 1;
}

.calc-table th[data-sort].sort-desc::after {
  content: ' ↓';
  opacity: 1;
}

.calc-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #dee2e6;
  color: #495057;
}

.calc-table tbody tr:hover {
  background: #f8f9fa;
}

.loading-cell {
  text-align: center;
  padding: 2rem;
  color: #666;
}

/* Bench Bar */
.bench-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: help;
  position: relative;
}

.bench-bar:hover {
  opacity: 0.9;
}

.bench-bar-fill {
  height: 8px;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 4px;
  min-width: 2px;
  transition: all 0.3s ease;
}

.bench-bar:hover .bench-bar-fill {
  height: 10px;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.4);
}

.bench-value {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
  min-width: 40px;
}

/* Tooltip container */
.bench-tooltip {
  position: fixed;
  background: #2c3e50;
  color: white;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.6;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  max-width: 300px;
  white-space: pre-line;
}

.bench-tooltip.show {
  opacity: 1;
}

.bench-tooltip strong {
  color: #3498db;
  display: block;
  margin-bottom: 4px;
}

/* Ensure table cells don't clip tooltips */
.calc-table td {
  overflow: visible;
}

.calc-table tbody tr {
  position: relative;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid #dee2e6;
}

.btn-page {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-page:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #0066cc;
}

.btn-page:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#page-info {
  font-size: 0.875rem;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .filter-row {
    grid-template-columns: 1fr;
  }
  
  .calc-table {
    font-size: 0.75rem;
  }
  
  .calc-table th,
  .calc-table td {
    padding: 0.5rem 0.25rem;
  }
}


/* Star Rating Styles */
.bench-rating {
  cursor: help;
  padding: 0.25rem;
}

.bench-rating .stars {
  font-size: 1.2rem;
  color: #ffa500;
  letter-spacing: 2px;
}

.bench-rating:hover .stars {
  color: #ff8c00;
}
