html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* Custom styles */
.card-header.bg-primary {
  color: white;
}

.card {
  border-radius: 0.5rem;
  overflow: hidden;
}

.card-header {
  background-color: rgba(0, 0, 0, 0.03);
}

.navbar-brand {
  font-weight: 600;
}

/* Admin dashboard */
.border-left-primary {
  border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
  border-left: 0.25rem solid #1cc88a !important;
}

.text-xs {
  font-size: .7rem;
}

.card-body {
  flex: 1 1 auto;
  min-height: 1px;
  padding: 1.25rem;
}

/* Camera card styles */
.card-header .badge {
  font-size: 0.8rem;
  padding: 0.4em 0.6em;
}

/* PoE toggle button styling */
.poe-toggle-btn {
  font-weight: 600;
  transition: all 0.3s;
}

.poe-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.poe-toggle-btn i {
  margin-right: 0.5rem;
}

/* Form styling */
.form-label {
  font-weight: 500;
}

.form-select, .form-control {
  border-radius: 0.375rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .card-header h5 {
    font-size: 1rem;
  }

  .poe-toggle-btn {
    font-size: 0.9rem;
  }
}

/* Add these to your site.css file */

/* Improved button styles */
.btn-outline-primary {
  color: #4e73df;
  border-color: #4e73df;
}

.btn-outline-primary:hover {
  background-color: #4e73df;
  color: #fff;
}

.btn-outline-danger {
  color: #e74a3b;
  border-color: #e74a3b;
}

.btn-outline-danger:hover {
  background-color: #e74a3b;
  color: #fff;
}

/* Standardized Button Styles - Consistent across entire application */
.btn {
  transition: all 0.2s;
  border-radius: 0.375rem; /* Standard rectangular with slight rounding */
  font-weight: 500;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
}

/* Remove any rounded-pill styling - we want consistent rectangular buttons */
.btn.rounded-pill {
  border-radius: 0.375rem !important;
}

/* Standard button sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

/* Icon spacing in buttons */
.btn i {
  margin: 0;
}

/* Table styles */
.table th {
  background-color: #f8f9fc;
  font-weight: 600;
  vertical-align: middle;
}

.table-bordered td, .table-bordered th {
  border: 1px solid #e3e6f0;
}

/* Card styles */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  overflow: hidden;
}

.card-header {
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
  padding: 0.75rem 1.25rem;
}

.card-header h6 {
  color: #4e73df;
  font-weight: 700;
  margin: 0;
}

/* Gap utility for button spacing (Bootstrap 5) */
.gap-2 {
  gap: 0.5rem !important;
}

/* Dark mode table header for better contrast */
.table thead th {
  color: #5a5c69;
  background-color: #f8f9fc;
  border-bottom-width: 1px;
}

/* Fixed action column width */
.table th.actions-column,
.table td.actions-column {
  width: 150px;
  white-space: nowrap;
}

/* Consistent Action Button Styling */
.btn-action {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease-in-out;
  border-width: 1px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn-action i {
  font-size: 0.875rem;
  margin: 0;
}

/* Edit Button Styling */
.btn-action-edit {
  color: #0d6efd;
  background-color: transparent;
  border-color: #0d6efd;
}

.btn-action-edit:hover {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.25);
}

/* Delete Button Styling */
.btn-action-delete {
  color: #dc3545;
  background-color: transparent;
  border-color: #dc3545;
}

.btn-action-delete:hover {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.25);
}

/* Button Group Styling */
.action-buttons {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

/* Responsive button text hiding */
@media (max-width: 768px) {
  .btn-action span {
    display: none;
  }
  
  .btn-action i {
    margin: 0;
  }
}

/* For better table layout */
.table td {
  vertical-align: middle;
}

/* Border styles for info cards */
.border-left-info {
  border-left: 0.25rem solid #36b9cc !important;
}

.border-left-danger {
  border-left: 0.25rem solid #e74a3b !important;
}

.border-left-warning {
  border-left: 0.25rem solid #f6c23e !important;
}

/* Camera Dashboard Card Improvements */
.camera-control-type {
  margin-bottom: 1rem; /* Clean spacing */
}

.camera-control-type .btn-group {
  margin-top: 0.25rem;
}

/* Port disabled warning - inline with label */
.port-disabled-warning {
  color: #d9534f; /* Bootstrap danger color - much better contrast than yellow */
  font-size: 0.75rem;
  font-weight: 500;
}

.port-disabled-warning i {
  font-size: 0.9rem;
}

/* Improved control type toggle button colors */
.btn-poe-control {
  color: #20c997; /* Teal color for PoE */
  border-color: #20c997;
  background-color: transparent;
}

.btn-poe-control:hover:not(.disabled),
.btn-poe-control:focus:not(.disabled),
.btn-check:checked + .btn-poe-control {
  color: #fff;
  background-color: #20c997;
  border-color: #20c997;
}

.btn-poe-control.disabled {
  color: #6c757d;
  border-color: #6c757d;
  opacity: 0.5;
}

.btn-port-control {
  color: #6366f1; /* Indigo color for Port Control */
  border-color: #6366f1;
  background-color: transparent;
}

.btn-port-control:hover,
.btn-port-control:focus,
.btn-check:checked + .btn-port-control {
  color: #fff;
  background-color: #6366f1;
  border-color: #6366f1;
}

/* Ensure consistent card body height */
.camera-dashboard-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.camera-dashboard-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.camera-dashboard-card .card-body > div.d-grid {
  margin-top: auto; /* Push controls to bottom */
}