/* Magotomo — Smartphone device mock UI (shared) */

:root {
  --device-border: #e5e7eb;
  --device-shadow: 0 8px 32px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  --device-text: #1f2937;
  --device-muted: #6b7280;
  --device-screen: #ffffff;
  --device-radius: 24px;
}

/* Phone frame */
.mg-device {
  max-width: 380px;
  margin: 0 auto;
}

.mg-device--wide {
  max-width: 100%;
}

.mg-device-bezel {
  background: var(--device-screen);
  border: 1px solid var(--device-border);
  border-radius: var(--device-radius);
  box-shadow: var(--device-shadow);
  overflow: hidden;
}

.mg-device-bezel--pad {
  padding: 0;
}

.mg-device-notch-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px 6px;
  background: var(--device-screen);
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}

.mg-device-notch {
  width: 72px;
  height: 22px;
  background: #f3f4f6;
  border-radius: 0 0 14px 14px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.mg-device-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 11px;
  font-weight: 700;
  color: var(--device-text);
  padding-top: 4px;
}

.mg-device-screen {
  background: var(--device-screen);
  color: var(--device-text);
  min-height: 120px;
}

.mg-device-screen--pad {
  padding: 16px 18px 20px;
}

.mg-device-home-bar {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 6px;
  background: var(--device-screen);
  border-top: 1px solid #f3f4f6;
}

.mg-device-home-bar::after {
  content: '';
  width: 96px;
  height: 4px;
  background: #d1d5db;
  border-radius: 999px;
}

.mg-device-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.mg-device-appbar-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--device-text);
}

.mg-device-appbar-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 180, 100, 0.1);
  color: var(--mg-primary);
  border: 1px solid rgba(0, 180, 100, 0.25);
}

/* In-screen UI elements */
.mg-ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

.mg-ui-row:last-child { border-bottom: none; }

.mg-ui-label {
  font-weight: 600;
  color: var(--device-text);
}

.mg-ui-value {
  font-weight: 800;
  color: var(--mg-primary);
}

.mg-ui-value-muted {
  color: var(--device-muted);
  font-weight: 600;
}

.mg-ui-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.mg-ui-stat {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.mg-ui-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--device-muted);
  margin-bottom: 4px;
}

.mg-ui-stat-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--device-text);
}

.mg-ui-stat-val.accent { color: var(--mg-primary); }

.mg-ui-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  font-family: inherit;
  margin-top: 12px;
}

.mg-ui-btn-primary {
  background: var(--mg-primary);
  color: #fff;
}

.mg-ui-wifi-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 8px;
}

.mg-ui-wifi-item.active {
  border-color: rgba(0, 180, 100, 0.45);
  background: rgba(0, 180, 100, 0.06);
}

.mg-ui-success {
  text-align: center;
  padding: 24px 16px;
}

.mg-ui-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 180, 100, 0.12);
  color: var(--mg-primary);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

/* Howto step layout */
.mg-howto-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
  align-items: start;
}

@media (min-width: 768px) {
  .mg-howto-step {
    grid-template-columns: 1fr 300px;
  }
  .mg-howto-step.reverse {
    grid-template-columns: 300px 1fr;
  }
  .mg-howto-step.reverse .mg-howto-copy { order: 2; }
  .mg-howto-step.reverse .mg-device { order: 1; }
}

.mg-howto-copy {
  padding-top: 8px;
}

.mg-howto-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mg-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 12px;
}

.mg-howto-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--device-text);
  margin-bottom: 8px;
}

.mg-howto-desc {
  font-size: 14px;
  color: var(--device-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}

.mg-howto-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.mg-howto-list li {
  font-size: 14px;
  color: var(--device-text);
  padding: 6px 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.mg-howto-list li::before {
  content: '✓';
  color: var(--mg-primary);
  font-weight: 800;
  flex-shrink: 0;
}

/* Profile device settings */
.mg-profile-device-wrap {
  max-width: 420px;
  margin: 0 auto;
}

.mg-profile-device-wrap .mg-section-label {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
