/* Consorzio NLT Vehicles - Styles */

.cnlt-wrapper {
  margin: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.cnlt-loading,
.cnlt-error {
  padding: 20px;
  text-align: center;
  border-radius: 4px;
  background-color: #f0f0f1;
}

.cnlt-error {
  background-color: #fcf2f2;
  color: #d63638;
  border: 1px solid #d63638;
}

.cnlt-table-container {
  overflow-x: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cnlt-vehicles-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.cnlt-vehicles-table thead {
  background-color: #f6f7f7;
}

.cnlt-vehicles-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #1e1e1e !important;
  border-bottom: 2px solid #dcdcde;
  font-size: 14px;
}

.cnlt-vehicles-table td {
  padding: 15px;
  border-bottom: 1px solid #dcdcde;
  font-size: 14px;
  color: #2c3338;
}

.cnlt-vehicles-table tbody tr:hover {
  background-color: #f6f7f7;
}

.cnlt-vehicles-table tbody tr:last-child td {
  border-bottom: none;
}

/* Button Styles */
.cnlt-btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.cnlt-btn-primary {
  background-color: #2271b1;
  color: #fff;
}

.cnlt-btn-primary:hover {
  background-color: #135e96;
}

.cnlt-btn-primary:disabled {
  background-color: #8c8f94;
  cursor: not-allowed;
}

.cnlt-btn-secondary {
  background-color: #f6f7f7;
  color: #2c3338;
  border: 1px solid #8c8f94;
}

.cnlt-btn-secondary:hover {
  background-color: #dcdcde;
}

/* Dialog Styles */
.cnlt-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
}

.cnlt-dialog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease;
}

.cnlt-dialog-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  animation: slideIn 0.3s ease;
}

.cnlt-dialog-header {
  padding: 20px;
  border-bottom: 1px solid #dcdcde;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cnlt-dialog-header h3 {
  margin: 0;
  font-size: 18px;
  color: #1e1e1e;
}

.cnlt-dialog-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #8c8f94;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cnlt-dialog-close:hover {
  background-color: #f6f7f7;
  color: #2c3338;
}

.cnlt-dialog-body {
  padding: 20px;
}

.cnlt-form-group {
  margin-bottom: 20px;
}

.cnlt-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #1e1e1e;
  font-size: 14px;
}

.cnlt-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.cnlt-input:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

.cnlt-dialog-info {
  background-color: #f6f7f7;
  padding: 15px;
  border-radius: 4px;
  margin-top: 15px;
}

.cnlt-dialog-info p {
  margin: 5px 0;
  font-size: 14px;
  color: #2c3338;
}

.cnlt-dialog-footer {
  padding: 20px;
  border-top: 1px solid #dcdcde;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .cnlt-vehicles-table {
    font-size: 13px;
  }

  .cnlt-vehicles-table th,
  .cnlt-vehicles-table td {
    padding: 10px;
  }

  .cnlt-dialog-content {
    width: 95%;
  }

  .cnlt-dialog-footer {
    flex-direction: column;
  }

  .cnlt-btn {
    width: 100%;
  }
}

/* Loading spinner */
.cnlt-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.cnlt-km-value {
  font-weight: 600;
  color: #2271b1;
}

.cnlt-km-empty {
  color: #8c8f94;
  font-style: italic;
}
