/*!
 * Bluetooth OBD Connection Styles
 * Comprehensive styling for Bluetooth connectivity UI
 */

/* Connection Button States */
.btn.connected {
  background: var(--success, #10b981);
  color: white;
  border-color: var(--success, #10b981);
}

.btn.connected:hover {
  background: var(--success-dark, #059669);
  border-color: var(--success-dark, #059669);
}

/* iOS Notice */
.ios-notice {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.ios-notice .notice-icon {
  font-size: 2rem;
}

.ios-notice .notice-text {
  flex: 1;
  color: #856404;
}

/* Diagnostic Interface */
.diagnostic-interface {
  padding: 2rem 0;
  background: #f9fafb;
  min-height: 400px;
}

.diagnostic-interface.hidden {
  display: none;
}

.diagnostic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

/* Vehicle Info Card */
.vehicle-info .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.vehicle-info .info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vehicle-info .label {
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.vehicle-info .value {
  font-size: 1.125rem;
  color: #111827;
  font-family: 'Courier New', monospace;
}

/* Fault Codes Display */
.fault-codes .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}

.fault-codes .card-content {
  padding: 1.5rem;
  min-height: 100px;
}

.fault-code-item {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background: white;
  transition: all 0.2s;
}

.fault-code-item:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.fault-code-item .code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.fault-code-item .code {
  font-size: 1.25rem;
  font-weight: 700;
  color: #dc2626;
  font-family: 'Courier New', monospace;
}

.fault-code-item .raw-data {
  font-size: 0.875rem;
  color: #9ca3af;
  font-family: 'Courier New', monospace;
}

/* No Codes Message */
.no-codes {
  text-align: center;
  padding: 3rem;
  color: #10b981;
  font-size: 1.125rem;
  font-weight: 500;
}

/* Loading State */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: #6b7280;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Message States */
.message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
  text-align: center;
}

.message-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.message-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.message-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* Button Variants */
.btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-warning {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

.btn-warning:hover {
  background: #d97706;
  border-color: #d97706;
}

/* Connection Status */
#hero-connection-status,
#connection-status {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  min-height: 1.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .diagnostic-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .fault-codes .card-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .vehicle-info .info-grid {
    grid-template-columns: 1fr;
  }
  
  .ios-notice {
    flex-direction: column;
    text-align: center;
  }
}