/* frontend/css/modules/list-units.css */

.nextlist-list-units {
  width: 100%;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.nextlist-list-units .page-header {
  margin-bottom: 1.5rem;
}

.nextlist-list-units .header-content {
  display: flex;
  align-items: center;
  position: relative;
  height: 44px;
}

.nextlist-list-units .header-left {
  display: flex;
  align-items: center;
  z-index: 1;
}

.nextlist-list-units .btn-voltar {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
}

.nextlist-list-units .btn-voltar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 0.85rem;
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.nextlist-list-units .btn-voltar:hover .btn-voltar-circle {
  background-color: var(--primary-color);
  color: #ffffff;
}

.nextlist-list-units .btn-voltar-label {
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 500;
}

.nextlist-list-units .page-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  white-space: nowrap;
}

.nextlist-list-units .tabs-navigation {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 2px solid var(--border, #e5e7eb);
  margin-bottom: 2rem;
}

.nextlist-list-units .tab-button {
  background: none;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nextlist-list-units .tab-button:hover {
  color: var(--primary-color);
}

.nextlist-list-units .tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

.nextlist-list-units .tab-content {
  display: none;
}

.nextlist-list-units .tab-content.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  animation: lu-fadeIn 0.25s ease-out;
}

@keyframes lu-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nextlist-list-units .list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nextlist-list-units .list-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary, #6b7280);
  font-size: 0.95rem;
}

.nextlist-list-units .list-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary, #6b7280);
  font-size: 0.95rem;
}

.nextlist-list-units .list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background-color: var(--surface, #ffffff);
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
  gap: 1rem;
}

.nextlist-list-units .list-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-color: var(--primary-color);
}

.nextlist-list-units .card-fields {
  display: flex;
  align-items: center;
  flex: 1;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 1rem;
}

.nextlist-list-units .card-field {
  flex: 1;
  min-width: 0;
}

.nextlist-list-units .card-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nextlist-list-units .card-field-label {
  font-size: 0.7rem;
  color: var(--text-secondary, #9ca3af);
  font-weight: 500;
  letter-spacing: 0.03em;
  
}

.nextlist-list-units .card-field-value {
  font-size: 0.9rem;
  color: var(--text-primary, #1f2937);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nextlist-list-units .btn-menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-secondary, #6b7280);
  font-size: 1.1rem;
  transition: background-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.nextlist-list-units .btn-menu:hover {
  background-color: var(--surface-hover, #f3f4f6);
  color: var(--primary-color);
}

.nextlist-list-units .action-dropdown {
  display: none;
  position: fixed;
  background-color: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 1000;
  min-width: 130px;
  overflow: hidden;
}

.nextlist-list-units .action-dropdown.open {
  display: block;
  animation: lu-fadeIn 0.15s ease-out;
}

.nextlist-list-units .action-dropdown-item {
  width: 100%;
  background: none;
  border: none;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-primary, #1f2937);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s;
  font-family: inherit;
}

.nextlist-list-units .action-dropdown-item:hover {
  background-color: var(--surface-hover, #f3f4f6);
}

.nextlist-list-units .action-dropdown-item--danger {
  color: #ef4444;
}

.nextlist-list-units .action-dropdown-item--danger:hover {
  background-color: #fef2f2;
}

.nextlist-list-units .modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.4);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.nextlist-list-units .modal-overlay.open {
  display: flex;
  animation: lu-fadeIn 0.2s ease-out;
}

.nextlist-list-units .modal {
  background-color: var(--surface, #ffffff);
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.nextlist-list-units .modal-text {
  font-size: 0.95rem;
  color: var(--text-primary, #1f2937);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.nextlist-list-units .modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.nextlist-list-units .btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.15s;
}

.nextlist-list-units .btn-secondary {
  background-color: #f1f3f5;
  color: var(--text-primary, #1f2937);
  border: 1px solid var(--border, #e5e7eb);
}

.nextlist-list-units .btn-secondary:hover {
  opacity: 0.8;
}

.nextlist-list-units .btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.nextlist-list-units .btn-danger:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

html.dark-theme .nextlist-list-units .list-card {
  background-color: #1e1e1e;
  border-color: #333;
}

html.dark-theme .nextlist-list-units .list-card:hover {
  border-color: var(--primary-color);
}

html.dark-theme .nextlist-list-units .card-field-value {
  color: #f0f0f0;
}

html.dark-theme .nextlist-list-units .action-dropdown {
  background-color: #1e1e1e;
  border-color: #444;
}

html.dark-theme .nextlist-list-units .action-dropdown-item {
  color: #f0f0f0;
}

html.dark-theme .nextlist-list-units .action-dropdown-item:hover {
  background-color: #2c2c2c;
}

html.dark-theme .nextlist-list-units .modal {
  background-color: #1e1e1e;
}

html.dark-theme .nextlist-list-units .modal-text {
  color: #f0f0f0;
}

html.dark-theme .nextlist-list-units .btn-secondary {
  background-color: #2c2c2c;
  color: #f0f0f0;
  border-color: #555;
}

html.dark-theme .nextlist-list-units .tabs-navigation {
  border-bottom-color: #444;
}

@media (max-width: 768px) {
  .nextlist-list-units {
    padding: 16px;
  }

  .nextlist-list-units .card-fields {
    gap: 1rem;
  }

  .nextlist-list-units .tab-button {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
  }

  .nextlist-list-units .page-title {
    font-size: 1.2rem;
  }
}