/* Helmet Management Page Styles */
.helmet-management-layout {
  display: flex;
  height: 100%;
  gap: 24px;
}

.category-sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.category-sidebar .sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bs-border-color);
}

.category-list-item {
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-list-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-list-item.active {
  background: rgba(99, 102, 241, 0.3);
  border: 1px solid #6366f1;
  color: white;
}

.category-list-item .category-summary {
  font-size: 0.875rem;
  margin-top: 4px;
  opacity: 0.8;
}


.helmet-management-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.helmet-management-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
}

.management-title h3 {
  margin: 0 0 8px 0;
  font-weight: 600;
}

.helmet-stats {
  display: flex;
  gap: 16px;
  font-size: 0.875rem;
}

.stat-item {
  padding: 4px 8px;
  border-radius: 4px;
}

.online-stat {
  background: rgba(25, 135, 84, 0.1);
  color: var(--bs-success);
}

.offline-stat {
  background: rgba(220, 53, 69, 0.1);
  color: var(--bs-danger);
}

.helmet-management-body {
  flex: 1;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.search-filter-bar {
  display: flex;
  gap: 16px;
  align-items: center;
}

.search-box {
  flex: 1;
  max-width: 400px;
}

.filter-options {
  display: flex;
  gap: 12px;
}

.filter-options .form-select {
  min-width: 120px;
}

.helmet-management-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.list-header {
  display: grid;
  grid-template-columns: 50px 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 12px 16px;
  color: var(--bs-gray-400);
  border-radius: 8px;
  font-weight: 600;
  align-items: center;
}

.list-body {
  overflow-y: auto;
}

.helmet-list-item {
  display: grid;
  grid-template-columns: 50px 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  align-items: center;
  transition: all 0.2s ease;
}

.offline .helmet-list-item {
  opacity: 0.8;
}

.helmet-list-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.list-cell {
  display: flex;
  align-items: center;
}

.helmet-name-cell {
  font-weight: 600;
}

.helmet-id-cell {
  font-family: 'Courier New', monospace;
  color: var(--bs-gray-600);
}

.helmet-controller-cell {
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  align-items: start;
}

.helmet-actions-cell {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  white-space: nowrap;
}

.helmet-actions-cell .action-buttons-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.helmet-actions-cell .btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  flex-shrink: 0;
}

.helmet-actions-cell .toggle-arrow {
  flex-shrink: 0;
}

.no-helmets-left {
  color: var(--bs-gray-500);
  font-style: italic;
}

.no-helmets {
  text-align: center;
  padding: 40px;
  color: var(--bs-gray-500);
  font-style: italic;
}

/* Battery display styles for helmet management */
.helmet-management-list .battery-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}

.helmet-management-list .battery-bar {
  width: 40px;
  height: 8px;
  background: var(--bs-gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.helmet-management-list .battery-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.helmet-management-list .battery-text {
  min-width: 30px;
  text-align: right;
  font-weight: 500;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 6px;
  padding: 12px 16px;
}

/* Helmet Accordion Styles - Maintaining Original Style */
.helmet-management-list .accordion-item {
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bs-body-bg);
  transition: all 0.2s ease;
  overflow: hidden;
}

.helmet-management-list .accordion-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.helmet-management-list .accordion-item.online {
  border-left: 4px solid var(--bs-success);
}

.helmet-management-list .accordion-item.offline {
  border-left: 4px solid var(--bs-danger);
  opacity: 0.8;
}

.helmet-management-list .accordion-header {
  border: none;
  padding: 0;
  background: transparent;
  margin-bottom: 0;
}

/* Ensure accordion button doesn't affect styling */
.helmet-management-list .accordion-button {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-weight: inherit;
  font-family: inherit;
  line-height: inherit;
  text-align: left;
  width: 100%;
}

.helmet-management-list .accordion-button:not(.collapsed) {
  background: transparent;
  color: inherit;
  box-shadow: none;
}

.helmet-management-list .accordion-button:focus {
  box-shadow: none;
  border: none;
}

.helmet-management-list .accordion-button::after {
  display: none; /* Remove default Bootstrap arrow */
}

/* Modify helmet-list-item for accordion usage */
.helmet-management-list .helmet-list-item {
  border: none !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.helmet-management-list .helmet-list-item:hover {
  box-shadow: none !important;
  transform: none !important;
}

/* Accordion body styles for applications */
.helmet-management-list .accordion-body {
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--bs-border-color);
  margin: 0;
}

.helmet-applications {
  padding: 0;
  margin: 0;
}

.helmet-applications h6 {
  font-weight: 600;
}

.helmet-applications .helmet-applications-header {
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--bs-border-color);
}

/* Style for no applications message */
.helmet-applications .text-muted {
  text-align: center;
  font-style: italic;
}

.selection-info {
  color: #00ff88;
  font-weight: 500;
  font-size: 14px;
}

.bulk-actions {
  display: flex;
  gap: 8px;
}

/* Selection Mode Styles */
.helmet-list-item {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  position: relative;
}

.helmet-list-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.helmet-list-item.selected {
  background-color: rgba(0, 255, 136, 0.15);
  border-left: 4px solid #00ff88 !important;
}

.helmet-list-item.selected:hover {
  background-color: rgba(0, 255, 136, 0.2);
}

/* Checkbox styling */
.helmet-checkbox-header {
  display: flex;
  justify-content: center;
}

.helmet-checkbox-cell {
  display: flex;
  justify-content: center;
}

.helmet-checkbox-cell .form-check-input,
.helmet-checkbox-header .form-check-input {
  margin: 0;
  cursor: pointer;
}

/* ======================= volume start ======================= */
/* Volume Control Styles */
.helmet-volume-header,
.helmet-volume-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

/* Volume Button Styles */
.helmet-volume-cell .volume-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-body-color);
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  user-select: none;
  padding: 0;
}

.helmet-volume-cell .volume-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--bs-primary);
}

.helmet-volume-cell .volume-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

/* Output value display */
.helmet-volume-cell .volume-output {
  font-size: 0.75rem;
  font-weight: 500;
  min-width: 1.5rem;
  text-align: center;
  padding: 1px 4px;
  border-radius: 3px;
  cursor: text;
  background: transparent;
  border: 1px solid transparent;
  color: var(--bs-body-color);
}

.helmet-volume-cell .volume-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/*.helmet-volume-cell .volume-output:hover {*/
/*  background: rgba(255, 255, 255, 0.05);*/
/*  border-color: var(--bs-border-color);*/
/*}*/

/*.helmet-volume-cell .volume-output:focus {*/
/*  outline: none;*/
/*  background: rgba(255, 255, 255, 0.08);*/
/*  border-color: var(--bs-primary);*/
/*}*/
/* ======================= volume end ======================= */