/*
 * Equipment Page Styles
 * Note: Tab styles are now in /assets/css/tabs.css for site-wide consistency
 */

/* Equipment Master Table */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  background: white;
}

.responsive-table th {
  background-color: #E9ECEF;
  color: #2c2c2c;
  padding: 10px 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: left;
  white-space: nowrap;
  border: none;
  margin: 0;
}

.responsive-table td {
  padding: 8px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.8rem;
  vertical-align: middle;
}

.responsive-table tbody tr {
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.responsive-table tbody tr:hover {
  background-color: #f5f5f5;
}

.responsive-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.responsive-table tbody tr:nth-child(even):hover {
  background-color: #f5f5f5;
}

/* Column-specific widths for equipment master table */
.responsive-table th:nth-child(1),
.responsive-table td:nth-child(1) {
  /* Unit Number */
  width: 12%;
  min-width: 100px;
}

.responsive-table td:nth-child(1) {
  /* Unit Number cell - bold text */
  font-weight: 600;
  color: #1f2937;
}

.responsive-table th:nth-child(2),
.responsive-table td:nth-child(2) {
  /* Assigned Site */
  width: 25%;
  min-width: 180px;
}

.responsive-table th:nth-child(3),
.responsive-table td:nth-child(3) {
  /* Type */
  width: 13%;
  min-width: 110px;
}

.responsive-table th:nth-child(4),
.responsive-table td:nth-child(4) {
  /* Category */
  width: 10%;
  min-width: 90px;
}

.responsive-table th:nth-child(5),
.responsive-table td:nth-child(5) {
  /* Make/Model */
  width: 18%;
  min-width: 140px;
}

.responsive-table th:nth-child(6),
.responsive-table td:nth-child(6) {
  /* Status */
  width: 10%;
  min-width: 80px;
}

.responsive-table th:nth-child(7),
.responsive-table td:nth-child(7) {
  /* Ownership */
  width: 12%;
  min-width: 100px;
}

/* Mobile responsiveness for equipment master table */
@media (max-width: 768px) {
  .responsive-table {
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
  }

  .responsive-table th,
  .responsive-table td {
    padding: 6px 4px;
    font-size: 0.75rem;
  }

  .responsive-table th {
    font-size: 0.7rem;
  }
}

/* Equipment Attachments Table */
.equipmentAttachTable {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  background: white;
}

.equipmentAttachTable th {
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: solid 1px #7a7a7a;
  background-color: #F8F9FA;
}

.equipmentAttachTable td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  vertical-align: middle;
  font-size:smaller;
}

.equipmentAttachTable tbody tr {
  transition: background-color 0.2s ease;
}

.equipmentAttachTable tbody tr:hover {
  background-color: #f3f4f6;
}

.equipmentAttachTable tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.equipmentAttachTable tbody tr:nth-child(even):hover {
  background-color: #f3f4f6;
}

/* Column-specific widths for equipment attachments */
.equipmentAttachTable th:nth-child(1),
.equipmentAttachTable td:nth-child(1) {
  width: 20%;
  min-width: 150px;
  font-weight: 500;
  color: #1f2937;
  text-align: left;
}

.equipmentAttachTable th:nth-child(2),
.equipmentAttachTable td:nth-child(2) {
  width: 12%;
  min-width: 100px;
  text-align: left;
}

.equipmentAttachTable th:nth-child(3),
.equipmentAttachTable td:nth-child(3) {
  width: 10%;
  min-width: 90px;
  text-align: left;
}

.equipmentAttachTable th:nth-child(4),
.equipmentAttachTable td:nth-child(4) {
  width: 25%;
  min-width: 180px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.equipmentAttachTable th:nth-child(5),
.equipmentAttachTable td:nth-child(5) {
  width: 12%;
  min-width: 100px;
  text-align: left;
}

.equipmentAttachTable th:nth-child(6),
.equipmentAttachTable td:nth-child(6) {
  width: 13%;
  min-width: 110px;
  text-align: left;
}

.equipmentAttachTable th:nth-child(7),
.equipmentAttachTable td:nth-child(7) {
  width: 8%;
  min-width: 70px;
  text-align: center;
}

/* Action button styling within the table */
.equipmentAttachTable .btn-row-edit {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.equipmentAttachTable .btn-row-edit:hover {
  background: #2563eb;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .equipmentAttachTable {
    font-size: 0.85rem;
    display: block;
    overflow-x: auto;
  }

  .equipmentAttachTable th,
  .equipmentAttachTable td {
    padding: 0.5rem 0.4rem;
  }

  .equipmentAttachTable th {
    font-size: 0.75rem;
  }

  /* Hide description column on mobile to save space */
  .equipmentAttachTable th:nth-child(4),
  .equipmentAttachTable td:nth-child(4) {
    display: none;
  }
}
