:root {
  --bg-dark: #1e1f21;
  --bg-card: #212529;
  --text-light: #e4e6eb;
  --text-muted: #94a3b8;
  --border-color: #3a3b3d;
  --accent-color: #1abc9c;
  --input-bg: #2c3e50;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

/* Badge Styles */
.state-icon .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge.bg-success {
  background-color: var(--success-color) !important;
  color: var(--text-light) !important;
}

.badge.bg-warning {
  background-color: var(--warning-color) !important;
  color: var(--bg-dark) !important;
}

.badge.bg-danger {
  background-color: var(--danger-color) !important;
  color: var(--text-light) !important;
}

/* Form Controls */
.form-control {
  border-radius: 8px;
  box-shadow: none;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  color: var(--text-light);
}

.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(26, 188, 156, 0.25);
  border-color: var(--accent-color);
}

/* Button Styles */
.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-primary:hover {
  background-color: #16a085;
  border-color: #16a085;
}

.btn-primary:focus, .btn-primary.focus {
  box-shadow: 0 0 0 0.2rem rgba(26, 188, 156, 0.5);
}

/* Card Styles */
.card {
  border-radius: 15px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}

.card-header {
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.05);
}

.card-body {
  padding: 1.5rem;
}

/* Table Styles */
.table {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.table th a {
  text-decoration: none;
  color: var(--accent-color);
}

.table th, .table td {
  vertical-align: middle;
  border-color: var(--border-color);
}

.table thead th {
  background-color: var(--bg-card);
}

.table tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

.table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Button Link Styles */
.btn-link.badge-view-log {
  padding: 0;
  font-size: 0.875rem;
  color: var(--accent-color);
}

.btn-link.badge-view-log:hover {
  color: #16a085;
  text-decoration: underline;
}

/* Placeholder color */
::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

:-ms-input-placeholder {
  color: var(--text-muted);
}

::-ms-input-placeholder {
  color: var(--text-muted);
}

/* Pagination Styles */
.pagination .page-item .page-link {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-light);
}

.pagination .page-item.active .page-link {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-light);
}

.pagination .page-item .page-link:hover {
  background-color: var(--input-bg);
  border-color: var(--border-color);
  color: var(--text-light);
}

.pagination .page-item.disabled .page-link {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-muted);
}

/* Ensure the table container allows for overflow */
.table-responsive {
  overflow: visible;
}

/* Position the dropdown container */
.dropdown {
  position: static;
}

/* Style the dropdown menu */
.dropdown-menu {
  position: absolute;
  right: 0;
  left: auto;
  top: 100%;
  z-index: 1000;
  float: none;
  min-width: 10rem;
  margin: 0.125rem 0 0;
  font-size: 1rem;
  text-align: left;
  list-style: none;
  background-clip: padding-box;
  border-radius: 0.25rem;
}

/* Ensure dropdown items don't wrap */
.dropdown-item {
  white-space: nowrap;
}

/* Adjust the table cell containing the dropdown */
.table td:last-child {
  position: relative;
}

/* Ensure the dropdown button doesn't affect layout */
.dropdown-toggle {
  position: relative;
  z-index: 1;
}

.vm-details-modal .modal-content {
  background-color: #1e1e1e;
  color: #ffffff;
}

.vm-details-modal .card {
  background-color: #2a2a2a;
  border: 1px solid var(--border-color);
}

.vm-details-modal .card-title {
  color: #3498db;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.vm-details-modal .card-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  color: #ffffff; /* Ensure text is white */
}

.vm-details-modal .card-text i {
  width: 20px;
  color: #3498db;
}

.vm-details-modal .card-text span {
  color: #ffffff; /* Ensure text is white */
}

.vm-details-modal .badge {
  font-size: 0.8rem;
  padding: 0.3em 0.6em;
}

/* Override any conflicting styles */
.vm-details-modal * {
  color: #ffffff;
}

.vm-details-modal .card-title,
.vm-details-modal .card-text i {
  color: #3498db;
}

.vm-details-modal .modal-content {
  /* background-color: #f8f9fa; */
  color: #333;
}

.vm-details-container {
  padding: 20px;
}

.info-card {
  background-color: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.info-card h5 {
  color: var(--accent-color);
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 1.1rem;
}

.info-card h5 i {
  margin-right: 10px !important;
}

.info-item {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
}

.info-item i {
  width: 20px;
  margin-right: 20px;
  color: var(--accent-color);
  font-size: 0.9rem;
}

.info-item-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
}

.info-item-title {
  font-weight: bold;
  margin-right: 10px;
}

.badge {
  font-size: 0.8em;
  padding: 5px 10px;
  border-radius: 20px;
}

/* Widen the ansible log modal */

.custom-wide-modal {
  max-width: 90% !important; 
  width: 90%;
}

@media (min-width: 992px) {
  .custom-wide-modal {
    margin-left: auto;
    margin-right: auto;
  }
}