/*
 * Site Page Styles
 * Note: Tab styles are now in /assets/css/tabs.css for site-wide consistency
 */

/* Test mode banner */
.test-mode-banner {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  padding: 1rem;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
  border: 2px solid #f57c00;
}

/* Cards layout - side by side */
.cards-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cards-row .sites-info-card {
  flex: 1;
  min-width: 300px;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .cards-row .sites-info-card {
    min-width: 0;
  }
}

.sites-info-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--box-shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-light);
}

.card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-text);
}

.card-header div {
  display: flex;
  gap: 0.5rem;
}

.card-body {
  padding: 1rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.form-group {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.form-group.form-group-half {
  flex: 0 0 calc(50% - 0.375rem);
  max-width: calc(50% - 0.375rem);
}

.form-group.form-group-third {
  flex: 0 0 calc(33.333% - 0.5rem);
  max-width: calc(33.333% - 0.5rem);
}

.form-group.form-group-auto {
  flex: 0 0 auto;
  min-width: 250px;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9rem;
}

/* Nested card inside sites-info-card */
.nested-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  overflow: hidden;
}

.nested-card-header {
  background: #e9ecef;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

.nested-card-header h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 600;
}

.nested-card-body {
  padding: 0.75rem;
}

/* Management form inline layout */
.mgmt-form-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.nested-card-body .mgmt-form-row:last-child {
  margin-bottom: 0;
}

.mgmt-form-row label {
  flex: 0 0 100px;
  margin-bottom: 0;
  text-align: right;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9rem;
}

.mgmt-form-row .autocomplete-container {
  flex: 1;
}

.mgmt-field-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mgmt-field-container .autocomplete-container {
  flex: 1;
}

.field-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.btn-field-add {
  padding: 0.4rem 0.75rem;
  background: #F2822C;
  color: white;
  border: 1px solid #000000;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn-field-add:hover {
  background: #F25F2C;
}

.btn-field-edit {
  padding: 0.4rem 0.75rem;
  background: #fd7860;
  color: white;
  border: 1px solid #000000;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn-field-edit:hover {
  background: #e86850;
}

/* Autocomplete container and dropdown */
.autocomplete-container {
  position: relative;
}

.autocomplete-container input[type="text"] {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-small);
  font-size: 0.95rem;
  font-family: inherit;
}

.autocomplete-container input[type="text"]:focus {
  outline: none;
  border-color: #2196f3;
}

.autocomplete-container input[type="text"][readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.mgmt-form-row select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-small);
  font-size: 0.95rem;
  font-family: inherit;
  background-color: white;
}

.mgmt-form-row select:focus {
  outline: none;
  border-color: #2196f3;
}

/* Style inputs/selects directly inside mgmt-field-container (for non-autocomplete fields) */
.mgmt-field-container > input[type="text"],
.mgmt-field-container > input[type="email"],
.mgmt-field-container > input[type="tel"],
.mgmt-field-container > input[type="number"],
.mgmt-field-container > select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-small);
  font-size: 0.95rem;
  font-family: inherit;
  background-color: white;
}

.mgmt-field-container > input:focus,
.mgmt-field-container > select:focus {
  outline: none;
  border-color: #2196f3;
}

.mgmt-field-container > input[readonly],
.mgmt-field-container > select[disabled] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

/* Multi-person list styles */
.multi-person-list {
  flex: 1;
}

.person-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-small);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.person-item:last-child {
  margin-bottom: 0;
}

.person-name {
  flex: 1;
}

.person-actions {
  display: flex;
  gap: 0.5rem;
}

.person-action-btn {
  padding: 0.2rem 0.5rem;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
}

.person-action-btn:hover {
  background: #1976d2;
}

.person-action-btn.remove {
  background: #d32f2f;
}

.person-action-btn.remove:hover {
  background: #b71c1c;
}

.empty-list {
  padding: 0.4rem 0.5rem;
  background: #f5f5f5;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-small);
  font-size: 0.95rem;
  color: #999;
  font-style: italic;
  text-align: left;
}

.autocomplete-container input.empty-state {
  background: #f5f5f5;
  color: #999;
  font-style: italic;
  font-size: 0.95rem;
  text-align: left;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-item {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover {
  background-color: #f5f5f5;
}

.autocomplete-item .name {
  font-weight: bold;
  color: #333;
}

.autocomplete-item .email {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.25rem;
}

.loading {
  padding: 0.75rem;
  text-align: center;
  color: #666;
  font-style: italic;
}

.no-results {
  padding: 0.75rem;
  text-align: center;
  color: #999;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-small);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.required {
  color: #d32f2f;
  font-weight: bold;
}

.no-data {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* Simple table for lists */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.simple-table thead {
  background: var(--color-bg-light);
  border-bottom: 2px solid var(--color-border);
}

.simple-table th {
  padding: 0.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
}

.simple-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  color: var(--color-text);
}

.simple-table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Site Equipment Table Column Widths */
.simple-table th:nth-child(1),
.simple-table td:nth-child(1) { width: 10%; min-width: 90px; text-align: left; }    /* Unit Number */
.simple-table th:nth-child(2),
.simple-table td:nth-child(2) { width: 15%; min-width: 120px; text-align: left; }   /* Assigned Site */
.simple-table th:nth-child(3),
.simple-table td:nth-child(3) { width: 12%; min-width: 100px; text-align: left; }   /* Type */
.simple-table th:nth-child(4),
.simple-table td:nth-child(4) { width: 15%; min-width: 120px; text-align: left; }   /* Category */
.simple-table th:nth-child(5),
.simple-table td:nth-child(5) { width: 18%; min-width: 150px; text-align: left; }   /* Make/Model */
.simple-table th:nth-child(6),
.simple-table td:nth-child(6) { width: 10%; min-width: 80px; text-align: left; }    /* Status */
.simple-table th:nth-child(7),
.simple-table td:nth-child(7) { width: 10%; min-width: 90px; text-align: left; }    /* Latitude */
.simple-table th:nth-child(8),
.simple-table td:nth-child(8) { width: 10%; min-width: 90px; text-align: left; }    /* Longitude */
.simple-table th:nth-child(9),
.simple-table td:nth-child(9) { width: 5%; min-width: 40px; text-align: left; }     /* Map Icon */

.form-group input[readonly],
.form-group select[disabled] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.form-group input.always-readonly {
  background-color: #e9ecef !important;
  cursor: not-allowed;
  color: #6c757d;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.btn-edit,
.btn-save,
.btn-cancel {
  padding: 0.4rem 1rem;
  border: none;
  border-radius: var(--border-radius-small);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-edit {
  background-color: #2196f3;
  color: white;
}

.btn-edit:hover {
  background-color: #1976d2;
}

.btn-save {
  background-color: #4caf50;
  color: white;
}

.btn-save:hover {
  background-color: #45a049;
}

.btn-cancel {
  background-color: #757575;
  color: white;
}

.btn-cancel:hover {
  background-color: #616161;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .content-section {
    padding: 0.75rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  .cards-row {
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
  }

  .cards-row .sites-info-card {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .sites-info-card {
    max-width: 100%;
    overflow-x: hidden;
  }

  .card-body {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Ensure tables don't overflow */
  .simple-table {
    max-width: 100%;
  }

  table {
    max-width: 100%;
  }

  .form-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .card-header {
    padding: 0.75rem;
  }

  .card-body {
    padding: 0.75rem;
  }

  .form-group.form-group-half,
  .form-group.form-group-third,
  .form-group.form-group-auto {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    flex: 1;
  }

  /* Management form mobile styles */
  .mgmt-form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    max-width: 100%;
  }

  .mgmt-form-row label {
    flex: 1;
    text-align: left;
    margin-bottom: 0.25rem;
    max-width: 100%;
  }

  .mgmt-field-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    max-width: 100%;
  }

  .field-actions {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
  }

  .autocomplete-container {
    max-width: 100%;
  }

  .multi-person-list {
    max-width: 100%;
  }

  /* Ensure all inputs fit within container */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="date"],
  input[type="datetime-local"],
  select,
  textarea {
    max-width: 100%;
    width: 100%;
  }

  .btn-field-edit,
  .btn-field-add {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    min-height: 44px;
    max-width: 100%;
  }

  .btn-save,
  .btn-cancel {
    padding: 0.6rem 1rem;
    min-height: 44px;
    max-width: 100%;
  }

  .person-action-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-height: 40px;
  }

  .nested-card {
    max-width: 100%;
  }

  .nested-card-header {
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
  }

  .nested-card-body {
    max-width: 100%;
  }

  /* Table mobile styles */
  .simple-table {
    font-size: 0.85rem;
    max-width: 100%;
  }

  .simple-table th,
  .simple-table td {
    padding: 0.4rem 0.3rem;
    white-space: nowrap;
  }

  /* Make table container scrollable on mobile */
  #equipmentList {
    overflow-x: auto;
    /*-webkit-overflow-scrolling: touch;*/
    max-width: 100%;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
  display: block;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  border-radius: var(--border-radius);
  max-width: 1150px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-light);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-text);
}

.modal-close {
  font-size: 2rem;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover,
.modal-close:focus {
  color: #000;
}

.modal-body {
  padding: 1.5rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-body .sites-info-card {
  margin-bottom: 1rem;
  overflow: hidden;
}

.modal-body .card-body {
  overflow: hidden;
}

.modal-body .form-row {
  max-width: 100%;
}

/* Locked field with icon */
.locked-field-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.locked-field-wrapper input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.locked-field-wrapper input[readonly] {
  background-color: #fff3cd;
  border-color: #ffc107;
  padding-right: 2rem;
}

.lock-icon {
  cursor: pointer;
  width: 20px;
  height: 20px;
  transition: opacity 0.2s;  
  -webkit-user-select: none;
  user-select: none;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lock-icon:hover {
  opacity: 0.7;
}

.locked-field-wrapper input:not([readonly]) {
  background-color: #e8f5e9;
  border-color: #4caf50;
  padding-right: 2rem;
}

/* Modal mobile responsiveness */
@media (max-width: 768px) {
  .modal-content {
    margin: 0;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .modal-header {
    border-radius: 0;
  }

  .modal-body {
    max-height: calc(100vh - 150px);
    padding: 1rem;
  }
}

/* ========================================
   Site Software & Child Site Styles
   ======================================== */

/* Child site checkbox hover effects */
.child-site-checkbox:hover {
  border-color: #F25F2C !important;
  background: #fff5f0 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(242, 95, 44, 0.1);
}

.child-site-checkbox:has(input:checked) {
  border-color: #F25F2C !important;
  background: #fff5f0 !important;
  box-shadow: 0 2px 8px rgba(242, 95, 44, 0.15);
}

.child-site-checkbox:has(input:checked) span {
  color: #F25F2C !important;
  font-weight: 600;
}

/* Highlight active software row being edited */
.software-row.active {
  background: #e6f2ff !important;
  border-left: 4px solid #4a90e2 !important;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2) !important;
}

/* Highlight active feature row being edited */
.feature-row.active {
  background: #e6f2ff !important;
  border-left: 4px solid #4a90e2 !important;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2) !important;
}

/* Edit child site checkbox styles */
.edit-child-site-checkbox:hover {
  border-color: #b0d4f1 !important;
  background: #f0f8ff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(176, 212, 241, 0.3);
}

/* ========================================
   Site Geofence Map Styles
   ======================================== */

/* Geofence navigation link list */
.geofence-link-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 15px;
  max-width: 300px;
}

.geofence-link {
  color: #0078d4;
  text-decoration: none;
  font-size: 0.7rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  display: block;
}

.geofence-link:hover {
  background-color: rgba(0, 120, 212, 0.1);
  color: #005a9e;
}

.geofence-link:active {
  background-color: rgba(0, 120, 212, 0.2);
}

.site-geofence-map-container {
  width: 100%;
  height: 800px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
}

.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #6c757d;
  font-style: italic;
}

/* Coordinate Display Styles */
.coordinate-display-section {
  padding-top: 0;
  border-top: none;
}

.coordinate-display-section h5 {
  margin: 0 0 12px 0;
  color: #495057;
  font-size: 1rem;
  font-weight: 600;
}

.coordinate-table {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  overflow: hidden;
}

.coordinate-header {
  display: flex;
  background: #e9ecef;
  font-weight: 600;
  font-size: 0.9rem;
  color: #495057;
  border-bottom: 1px solid #dee2e6;
}

.coordinate-col {
  flex: 1;
  padding: 10px 12px;
  border-right: 1px solid #dee2e6;
}

.coordinate-col:last-child {
  border-right: none;
}

.coordinate-rows {
  max-height: 400px;
  overflow-y: auto;
}

.coordinate-row {
  display: flex;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.85rem;
}

.coordinate-row:last-child {
  border-bottom: none;
}

.coordinate-row .coordinate-col {
  font-family: 'Courier New', monospace;
  color: #212529;
  background: #ffffff;
}

.coordinate-row .coordinate-col:first-child {
  color: #6c757d;
}

.coordinate-row .coordinate-col:last-child {
  color: #0056b3;
  font-weight: 500;
}

.coordinate-row.drag-highlight {
  background-color: #fff5f5 !important;
  border: 3px solid #ff6b6b !important;
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.6) !important;
  transform: scale(1.03);
  transition: all 0.2s ease;
  margin: 2px 0;
}

.coordinate-row.drag-highlight .coordinate-col {
  background-color: #fff5f5 !important;
}

.coordinate-row.drag-highlight .coordinate-col:first-child {
  border: 3px solid #FFD700 !important;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6) !important;
  background-color: #fffef0 !important;
}

/* ========================================
   Related Sites Checkbox Grids
   ======================================== */

/* Grid for "Add to Related Sites" section */
.related-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

/* Grid for "Related Sites" (editing) section */
.related-sites-grid-edit {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 12px;
  padding: 12px;
  background: #f0f8ff;
  border-radius: 8px;
  border: 1px solid #b0d4f1;
}

/* Toggle button section */
.toggle-section {
  margin-bottom: 10px;
  text-align: right;
  text-align: left;
}

/* Instruction text styling */
.instruction-text {
  font-size: 13px;
  color: #666;
  margin: 0 0 8px 0;
}

/* Toggle All button styling */
.btn-toggle-all {
  padding: 6px 16px;
  font-size: 13px;
  background: #0078d4;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-toggle-all:hover {
  background: #006bc7;
}

.btn-toggle-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========================================
   Site Attachments Table
   ======================================== */

/* Site Attachments Table */
.siteAttachTable {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  background: white;
}

.siteAttachTable th {
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: solid 1px #7a7a7a;
  background-color: #F8F9FA;
}

.siteAttachTable td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  vertical-align: middle;
  font-size:smaller;
}

.siteAttachTable tbody tr {
  transition: background-color 0.2s ease;
}

.siteAttachTable tbody tr:hover {
  background-color: #f3f4f6;
}

.siteAttachTable tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.siteAttachTable tbody tr:nth-child(even):hover {
  background-color: #f3f4f6;
}

/* Column-specific widths for site attachments */
.siteAttachTable th:nth-child(1),
.siteAttachTable td:nth-child(1) {
  width: 20%;
  min-width: 150px;
  font-weight: 500;
  color: #1f2937;
  text-align: left;
}

.siteAttachTable th:nth-child(2),
.siteAttachTable td:nth-child(2) {
  width: 12%;
  min-width: 100px;
  text-align: left;
}

.siteAttachTable th:nth-child(3),
.siteAttachTable td:nth-child(3) {
  width: 10%;
  min-width: 90px;
  text-align: left;
}

.siteAttachTable th:nth-child(4),
.siteAttachTable td:nth-child(4) {
  width: 25%;
  min-width: 180px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.siteAttachTable th:nth-child(5),
.siteAttachTable td:nth-child(5) {
  width: 12%;
  min-width: 100px;
  text-align: left;
}

.siteAttachTable th:nth-child(6),
.siteAttachTable td:nth-child(6) {
  width: 13%;
  min-width: 110px;
  text-align: left;
}

.siteAttachTable th:nth-child(7),
.siteAttachTable td:nth-child(7) {
  width: 8%;
  min-width: 70px;
  text-align: center;
}

/* Action button styling within the table */
.siteAttachTable .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;
}

.siteAttachTable .btn-row-edit:hover {
  background: #2563eb;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .siteAttachTable {
    font-size: 0.85rem;
    display: block;
    overflow-x: auto;
  }

  .siteAttachTable th,
  .siteAttachTable td {
    padding: 0.5rem 0.4rem;
  }

  .siteAttachTable th {
    font-size: 0.75rem;
  }

  /* Hide description column on mobile to save space */
  .siteAttachTable th:nth-child(4),
  .siteAttachTable td:nth-child(4) {
    display: none;
  }
}
