/* ===== Lock Screen ===== */
.lock-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 62px 18px 28px;
  transition: transform var(--duration-slow) var(--ease-ios), opacity 0.6s ease;
  z-index: 5;
  touch-action: manipulation; /* synthesise click from taps without 300 ms delay */
  user-select: none;
  background:
    radial-gradient(ellipse 160% 50% at 50% -8%, var(--color-accent) 0%, transparent 65%),
    radial-gradient(ellipse 70% 35% at 85% 110%, rgba(30, 70, 180, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 25% at 10% 75%, rgba(80, 30, 160, 0.15) 0%, transparent 50%);
}

.lock-screen.unlocked {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.lock-date {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: var(--space-5);
}

.lock-time {
  color: var(--color-text);
  font-size: 76px;
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: var(--space-1);
  text-shadow: 0 0 60px rgba(160, 100, 255, 0.25);
}

/* ===== Battery Widget ===== */
.lock-widgets {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;
  gap: 5px;
  margin-top: var(--space-5);
  padding: 0 var(--space-1);
}

.lock-battery-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lock-battery-top svg { width: 11px; height: 16px; flex-shrink: 0; }

.lock-battery-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
}

.lock-battery-name {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1;
}

.lock-battery-bar {
  width: 80px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.lock-battery-fill {
  width: 92%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
}

.lock-bottom { margin-top: auto; width: 100%; padding: 0 6px; }

/* ===== Slide-to-unlock track (desktop mode) ============================= */
.slide-track {
  position: relative;
  width: 100%; height: 56px;
  background: var(--color-slide-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.28);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.25);
  touch-action: none; /* prevent browser scroll-claiming the drag gesture */
  user-select: none;
}

.slide-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: 13px;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.slide-text::before {
  content: '';
  position: absolute;
  left: -100%; top: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6) 50%, transparent);
  animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}

/* ── Circular thumb ───────────────────────────────────────────────────── */
.slide-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 48px;
  height: 48px;
  background: var(--color-slide-thumb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 3;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.slide-thumb:active { cursor: grabbing; }

.slide-thumb:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.slide-thumb svg { width: 20px; height: 20px; color: #1a1a1a; }

/* ===== Tap-to-unlock prompt (mobile mode) ================================
   Hidden by default; shown via the media query below.
   pointer-events: none — the entire lock screen is the tap target.        */
.lock-tap-prompt {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 0 4px;
  pointer-events: none;
  user-select: none;
}

.tap-dots {
  display: flex;
  gap: 7px;
}

.tap-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  animation: dot-seq 1.5s ease-in-out infinite;
}

.tap-dots span:nth-child(2) { animation-delay: 0.22s; }
.tap-dots span:nth-child(3) { animation-delay: 0.44s; }

@keyframes dot-seq {
  0%, 55%, 100% { opacity: 0.25; transform: scale(0.75); }
  28%           { opacity: 1;    transform: scale(1.2);  }
}

.tap-text {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.68);
}

/* ===== Mode switch ========================================================
   At ≤ 680 px the layout switches to phone-only (no side panels). Hide the
   slide track and show the tap prompt. Must match the JS matchMedia exactly. */
@media (max-width: 680px) {
  .slide-track      { display: none; }
  .lock-tap-prompt  { display: flex; }
}

/* ===== Reduced motion ===================================================== */
@media (prefers-reduced-motion: reduce) {
  .slide-text::before { animation: none; }
  .tap-dots span      { animation: none; opacity: 0.5; }
}
