/* ============================================================
   ВЕБКОТЕСТЕР • Стили проверки камеры и микрофона
   Префикс .diag- для изоляции
   ============================================================ */

/* ============================================================
   🔹 КАРТОЧКИ
   ============================================================ */
.diag-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(44, 95, 141, 0.12);
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
}
.diag-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2c5f8d, #4a7c59, #f59e0b);
  opacity: 0.8;
}
.diag-card:hover {
  border-color: #2c5f8d;
  transform: translateY(-2px);
}

.diag-card-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: -1.25rem -1.5rem 1.25rem -1.5rem;
  border-radius: 16px 16px 0 0;
}
.diag-card-header i {
  color: #2c5f8d;
}

/* ============================================================
   🔹 СОВЕТ / ПОДСКАЗКА
   ============================================================ */
.diag-tip {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left: 4px solid #92400e;
  border-radius: 0 12px 12px 0;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  margin: 1rem auto;
  max-width: 700px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #1e293b;
  animation: diag-fadeIn 0.4s ease;
}
.diag-tip i {
  margin-right: 0.5rem;
  color: #92400e;
}
@keyframes diag-fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   🔹 КНОПКИ
   ============================================================ */
.diag-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.diag-btn-outline {
  background: #fff;
  border-color: #2c5f8d;
  color: #2c5f8d;
}
.diag-btn-outline:hover {
  background: #2c5f8d;
  color: #fff;
  transform: translateY(-2px);
}
.diag-btn-ghost {
  background: transparent;
  border-color: #cbd5e1;
  color: #6b7280;
}
.diag-btn-ghost:hover {
  background: #6b7280;
  color: #fff;
  border-color: #6b7280;
  transform: translateY(-2px);
}

.diag-av-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   🔹 ПРОВЕРКА КАМЕРЫ И МИКРОФОНА
   ============================================================ */
.diag-av-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .diag-av-grid {
    grid-template-columns: 1fr;
  }
}

.diag-av-video-wrap {
  position: relative;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e2e8f0;
}
.diag-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.diag-av-status {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  backdrop-filter: blur(4px);
  font-weight: 500;
}

.diag-av-mic-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}
.diag-av-mic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #1e293b;
}
.diag-av-mic-bar-bg {
  height: 28px;
  background: #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.diag-av-mic-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #eab308 60%, #ef4444 100%);
  width: 0%;
  transition: width 0.08s ease-out;
  border-radius: 14px;
}
.diag-av-status-mic {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
  text-align: center;
  min-height: 1.2em;
}

/* Пульсирующий индикатор LIVE */
.diag-av-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.diag-av-live-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: diag-pulse-live 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes diag-pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ============================================================
   🔹 ЗАГОЛОВОК
   ============================================================ */
.diag-header {
  text-align: center;
  padding: 1.5rem 1rem;
  margin-bottom: 1.5rem;
}
.diag-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #2c5f8d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 2px;
}
.diag-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
}
.diag-title-icon i {
  font-size: 2.5rem;
}
.diag-subtitle {
  color: #6b7280;
  font-size: 1.15rem;
  font-weight: 500;
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  letter-spacing: 0.5px;
}

/* ============================================================
   🔹 АДАПТИВ
   ============================================================ */
@media (max-width: 768px) {
  .diag-title { font-size: 1.9rem; letter-spacing: 1px; }
  .diag-title-icon i { font-size: 1.8rem; }
  .diag-subtitle { font-size: 1rem; }
  .diag-card { padding: 1rem; }
  .diag-card-header { margin: -1rem -1rem 1rem -1rem; padding: 0.75rem 1rem; }
}
