/* =========================================================
   GymDiet Master — Floating Rest Mini-Widget (Dark Neon)
   Docked at bottom right above bottom-nav, non-blocking UI
   Strictly OLED Black (#000000 / #05080e) + Neon Green (#00f076)
   ========================================================= */

.floating-rest-widget-container {
  position: fixed;
  bottom: 84px;
  right: 16px;
  z-index: 10005;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.floating-rest-widget-container.is-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(20px) scale(0.9) !important;
}

/* 1. Minimized Floating Pill */
.floating-rest-mini-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 8, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 240, 118, 0.35);
  border-radius: 30px;
  padding: 6px 14px 6px 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 118, 0.2);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-rest-mini-pill:hover {
  border-color: #00f076;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85), 0 0 26px rgba(0, 240, 118, 0.3);
}

.floating-rest-mini-pill.is-running {
  animation: rest-pill-glow 1.8s infinite alternate ease-in-out;
}

@keyframes rest-pill-glow {
  0% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 16px rgba(0, 240, 118, 0.15); }
  100% { box-shadow: 0 12px 34px rgba(0, 0, 0, 0.85), 0 0 28px rgba(0, 240, 118, 0.4); }
}

.floating-rest-ring-wrap {
  width: 30px;
  height: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-rest-ring-svg {
  width: 30px;
  height: 30px;
  transform: rotate(-90deg);
}

.floating-rest-ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.floating-rest-ring-fill {
  stroke: #00f076;
  transition: stroke-dashoffset 0.25s linear;
}

.floating-rest-pill-time {
  font-size: 14.5px;
  font-weight: 900;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* 2. Expanded Quick Controller Card */
.floating-rest-expanded-card {
  pointer-events: auto;
  width: 290px;
  background: #05080e;
  border: 1px solid rgba(0, 240, 118, 0.35);
  border-top: 1px solid rgba(0, 240, 118, 0.6);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 240, 118, 0.2);
  margin-bottom: 10px;
  box-sizing: border-box;
  transform-origin: bottom right;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-rest-widget-container:not(.is-expanded) .floating-rest-expanded-card {
  display: none;
}

.floating-rest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.floating-rest-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.floating-rest-card-title svg {
  color: #00f076;
}

.floating-rest-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.floating-rest-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Big Timer Digits */
.floating-rest-digits-stage {
  text-align: center;
  margin-bottom: 14px;
  padding: 8px 0;
  background: #000000;
  border: 1px solid rgba(0, 240, 118, 0.2);
  border-radius: 14px;
}

.floating-rest-big-time {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(0, 240, 118, 0.4);
}

.floating-rest-desc-state {
  font-size: 11px;
  color: #00f076;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* Presets: 3:00, 1:30, 0:45 */
.floating-rest-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.floating-rest-preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  color: #cbd5e1;
  transition: all 0.15s ease;
}

.floating-rest-preset-btn:hover,
.floating-rest-preset-btn.is-active {
  background: rgba(0, 240, 118, 0.15);
  border-color: rgba(0, 240, 118, 0.4);
  color: #00f076;
}

.floating-rest-preset-val {
  font-size: 13px;
  font-weight: 800;
  display: block;
}

.floating-rest-preset-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

.floating-rest-preset-btn:hover .floating-rest-preset-label {
  color: #cbd5e1;
}

/* Fine Adjustments Row: -15s / +15s */
.floating-rest-adjust-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.floating-rest-adjust-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 7px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.floating-rest-adjust-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Actions: Play/Pause, Reset */
.floating-rest-actions-row {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
}

.floating-rest-toggle-btn {
  background: #00f076;
  border: none;
  border-radius: 10px;
  color: #000000;
  font-weight: 900;
  font-size: 13px;
  padding: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 240, 118, 0.35);
  transition: all 0.15s ease;
}

.floating-rest-toggle-btn:hover {
  background: #17c987;
}

.floating-rest-toggle-btn.is-pause {
  background: #fbbf24;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35);
}

.floating-rest-stop-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.floating-rest-stop-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}
