/* -------------------------------------------------------------
 * Study Timer Tool - Modern UI Redesign
 * ------------------------------------------------------------- */
.leaf-timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 1rem 0;
}

.leaf-timer-task-wrap {
  width: 100%;
  max-width: 460px;
  margin-bottom: 2rem;
}

.leaf-timer-task-input {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: 9999px;
  padding: 12px 24px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.03);
  transition: all 0.25s ease;
}

.leaf-timer-task-input:focus {
  background: #ffffff;
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

/* Circular SVG Progress Clock */
.leaf-timer-clock-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 2.25rem auto;
}

.leaf-timer-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 16px rgba(16, 185, 129, 0.15));
}

.leaf-timer-circle-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 8;
}

.leaf-timer-circle-progress {
  fill: none;
  stroke: #059669;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 816.8;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}

.leaf-timer-circle-progress.break-mode {
  stroke: #0284c7;
}

.leaf-timer-center-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.leaf-timer-state-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 9999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  margin-bottom: 0.75rem;
}

.leaf-timer-state-badge.break-mode {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.leaf-timer-display {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.leaf-timer-session-info {
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Controls */
.leaf-timer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.leaf-timer-controls .leaf-btn {
  min-width: 140px;
  padding: 13px 26px;
  font-size: 1.05rem;
  border-radius: 14px;
}

button#timer-start-btn.leaf-btn-pause,
.leaf-timer-controls button.leaf-btn-pause {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
}

button#timer-start-btn.leaf-btn-pause:hover,
.leaf-timer-controls button.leaf-btn-pause:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5) !important;
}

/* Custom duration popup / drawer */
.leaf-timer-custom-settings {
  display: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem 1.75rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.leaf-timer-custom-settings.active {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}

/* Fullscreen mode */
.leaf-timer-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f0fdf4 100%) !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2rem !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
}

.leaf-timer-fullscreen .leaf-timer-clock-wrap {
  width: 400px;
  height: 400px;
}

.leaf-timer-fullscreen .leaf-timer-display {
  font-size: 6rem;
}

.leaf-timer-exit-fs,
#timer-exit-fs,
button.leaf-timer-exit-fs {
  display: none !important;
}

.leaf-timer-fullscreen .leaf-timer-exit-fs,
.leaf-timer-fullscreen #timer-exit-fs,
.leaf-timer-fullscreen button.leaf-timer-exit-fs {
  display: inline-flex !important;
  position: absolute !important;
  top: 1.5rem !important;
  right: 1.5rem !important;
  z-index: 9999999 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
  font-weight: 700 !important;
  padding: 8px 18px !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.leaf-timer-fullscreen .leaf-timer-exit-fs:hover,
.leaf-timer-fullscreen #timer-exit-fs:hover,
.leaf-timer-fullscreen button.leaf-timer-exit-fs:hover {
  background: #ffffff !important;
  color: #059669 !important;
  border-color: #a7f3d0 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.2) !important;
}

@media (max-width: 640px) {
  .leaf-timer-clock-wrap {
    width: 250px;
    height: 250px;
  }
  .leaf-timer-display {
    font-size: 3.5rem;
  }
}
