/**
 * HEALIST DEVICE DATA VIEWER - Design 4 Prestige
 * ================================================
 * Styling for the DeviceDataViewerModal component
 */

/* ============================================
   DEVICE MODAL CONTAINER
   ============================================ */
.device-modal {
  max-width: 1200px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* ============================================
   DEVICE MODAL HEADER
   ============================================ */
.device-modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--brand-primary-dark) 0%, var(--brand-primary) 100%);
  color: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.device-modal-header h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: white;
}

.device-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: var(--text-3xl);
  cursor: pointer;
  color: white;
  width: var(--space-10);
  height: var(--space-10);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.device-modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
  color: white;
}

/* ============================================
   DEVICE MODAL LAYOUT
   ============================================ */
.device-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ============================================
   DEVICE SIDEBAR NAVIGATION
   ============================================ */
.device-sidebar {
  width: 250px;
  border-right: 1px solid var(--brand-border);
  overflow-y: auto;
  background-color: var(--brand-surface-elevated);
  flex-shrink: 0;
}

.device-nav-group {
  margin-bottom: var(--space-3);
}

.device-nav-group-title {
  padding: var(--space-3) var(--space-5) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--brand-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.device-nav-item {
  width: 100%;
  padding: var(--space-3) var(--space-5);
  text-align: left;
  border: none;
  background: transparent;
  border-left: 3px solid transparent;
  color: var(--brand-text);
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.device-nav-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.device-nav-item.active {
  background: rgba(30, 58, 95, 0.08);
  border-left-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 600;
}

.device-nav-icon {
  font-size: var(--text-lg);
}

/* ============================================
   DEVICE CONTENT AREA
   ============================================ */
.device-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-8);
  min-height: 0;
}

.device-content-header {
  margin-bottom: var(--space-5);
}

.device-content-header h4 {
  margin: 0 0 var(--space-3) 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--brand-primary-dark);
}

/* ============================================
   DEVICE STATS GRID
   ============================================ */
.device-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
}

/* ============================================
   DEVICE LOADING STATE
   ============================================ */
.device-loading {
  text-align: center;
  padding: var(--space-10);
}

.device-loading p {
  margin-top: var(--space-4);
  color: var(--brand-text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .device-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .device-modal-body {
    flex-direction: column;
  }
  
  .device-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--brand-border);
    max-height: 200px;
  }
  
  .device-content {
    padding: var(--space-5);
  }
}