/* ==========================================================================
   Devio - UI Components
   ========================================================================== */

/* Login Card */
.login-card {
  background: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  text-align: center;
  max-width: 820px;
  width: 100%;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(50px);
  transition: all var(--transition-slow);
}

.login-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.login-card:hover {
  box-shadow: var(--shadow-md);
}

/* Logo */
.logo-section {
  margin-bottom: var(--spacing-lg);
}

.logo-icon {
  width: 80px;
  height: 80px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  margin: 0 auto var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-logo);
}

.logo-svg {
  width: 40px;
  height: 40px;
  fill: var(--color-primary);
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
  font-family: var(--font-heading);
  color: var(--color-text-primary);
}

.app-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  font-weight: 400;
}

/* Primary button (new session / google login) */
.new-session-btn {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: #fafbfe;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  outline: none;
}

.new-session-btn::before {
  content: none;
}

.new-session-btn:hover::before {
  left: 100%;
}

.new-session-btn:hover {
  transform: none;
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-sm);
}

.new-session-btn:active {
  transform: translateY(0);
}

.new-session-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.new-session-btn.loading:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--color-border);
}

/* Features list (login page) */
.features-section {
  margin-top: var(--spacing-xl);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-medium);
}

.feature-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-icon {
  width: 16px;
  height: 16px;
  fill: var(--color-accent);
  flex-shrink: 0;
}

/* Footer */
.footer-text {
  margin-top: var(--spacing-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: 1.5;
}

/* -----------------------------------------------------------------------
   Utility classes replacing inline styles in templates
   ----------------------------------------------------------------------- */

/* Device/temperature status panel */
.device-status-panel {
  background: var(--color-brand-subtle);
  border: 1px solid var(--color-brand-subtle-border);
}

.session-card,
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.session-card {
  border-top: 3px solid var(--color-primary);
}

/* Device page text input */
.device-input {
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(102, 126, 234, 0.05);
  border: 1px solid var(--color-brand-subtle-border);
  color: var(--color-text);
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
}

/* Ghost nav button (logout) */
.nav-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Danger ghost button (unlink device) */
.btn-danger-ghost {
  color: #f87171;
  background: none;
  border: none;
  cursor: pointer;
}

/* Primary text link */
.link-primary {
  color: var(--color-primary);
  text-decoration: none;
}

/* Temperature value text */
.device-temp-value {
  color: var(--color-text);
}

.device-temp-muted {
  color: var(--color-text-light);
}

/* CSS variable text helpers */
.text-muted-var {
  color: var(--color-text-muted);
}

.text-base-var {
  color: var(--color-text);
}

.text-light-var {
  color: var(--color-text-light);
}
