/* =====================================================
   Desk Break Theme — assets/css/desk-break.css
   ===================================================== */

:root {
  --sage:        #4a7c6f;
  --sage-light:  #6ba396;
  --sage-pale:   #e8f2ef;
  --teal:        #2d6a63;
  --sky:         #7eb8c9;
  --sky-pale:    #dff0f5;
  --cream:       #f7f4ef;
  --warm-white:  #fdfcfa;
  --text-dark:   #1e3532;
  --text-mid:    #4a6360;
  --text-soft:   #7a9b97;
  --gold:        #c49a4a;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.desk-break-app-page {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── BACKGROUND TEXTURE ── */
body.desk-break-app-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(126,184,201,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(74,124,111,0.14) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(232,242,239,0.5) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* WordPress admin bar offset */
body.desk-break-app-page.admin-bar { padding-top: 32px; }
@media screen and (max-width: 782px) {
  body.desk-break-app-page.admin-bar { padding-top: 46px; }
}

/* ── SCREENS ── */
.db-screen { display: none; position: relative; z-index: 1; }
.db-screen.active { display: flex; flex-direction: column; min-height: 100vh; }

/* ══════════════════════════════
   HOME SCREEN
══════════════════════════════ */
#db-home { align-items: center; }

.db-home-header {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
  max-width: 480px;
  width: 100%;
}

.db-logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.2rem;
}

.db-logo-leaf { width: 36px; height: 36px; opacity: 0.85; }

.db-app-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--teal);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.db-app-subtitle {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-mid);
  margin-top: 0.5rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.db-divider-leaf {
  margin: 1.2rem auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}
.db-divider-leaf::before,
.db-divider-leaf::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--sage-light);
  opacity: 0.5;
}
.db-divider-leaf span { font-size: 1rem; }

/* ── ACTIVITY GRID ── */
.db-activity-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  padding: 1.5rem 1.25rem;
}

.db-activity-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--warm-white);
  border: 1.5px solid rgba(74,124,111,0.15);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  box-shadow: 0 2px 8px rgba(45,106,99,0.06);
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  color: inherit;
}

.db-activity-btn:hover,
.db-activity-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,106,99,0.14);
  border-color: var(--sage-light);
  background: #fff;
  outline: none;
}
.db-activity-btn:active { transform: translateY(0); }

.db-btn-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-pale);
  border-radius: 10px;
}
.db-btn-text { flex: 1; }
.db-btn-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
}
.db-btn-duration {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 2px;
  font-weight: 300;
}
.db-btn-arrow { color: var(--sage-light); font-size: 1rem; flex-shrink: 0; }

/* ── FOOTER ── */
.db-home-footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 300;
  letter-spacing: 0.02em;
}
.db-home-footer .db-flag { font-size: 0.95rem; }

/* ══════════════════════════════
   ACTIVITY SCREEN
══════════════════════════════ */
#db-activity { background: transparent; align-items: center; }

.db-act-inner {
  max-width: 480px;
  width: 100%;
  padding: 0 1.25rem 2.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.db-back-bar { padding: 1.4rem 0 0.5rem; }

.db-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-mid);
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'DM Sans', sans-serif;
  padding: 0;
  transition: color 0.15s;
}
.db-back-link:hover { color: var(--teal); }

.db-act-card {
  flex: 1;
  background: var(--warm-white);
  border: 1.5px solid rgba(74,124,111,0.12);
  border-radius: 20px;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 4px 24px rgba(45,106,99,0.09);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.db-act-icon-wrap { font-size: 2.8rem; text-align: center; padding: 0.25rem 0 0.1rem; }

.db-act-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  color: var(--teal);
  text-align: center;
  line-height: 1.2;
}

.db-act-instructions {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.75;
  font-weight: 300;
}
.db-act-instructions p { margin-bottom: 0.6rem; }
.db-act-instructions p:last-child { margin-bottom: 0; }
.db-act-instructions strong { color: var(--text-dark); font-weight: 500; }

/* ── TIMER ── */
.db-timer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0 0.25rem;
}
.db-timer-ring-wrap { position: relative; width: 110px; height: 110px; }
.db-timer-ring-svg { width: 110px; height: 110px; transform: rotate(-90deg); }
.db-ring-bg { fill: none; stroke: var(--sage-pale); stroke-width: 7; }
.db-ring-progress {
  fill: none;
  stroke: var(--sage);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s linear, stroke 0.4s;
}
.db-ring-progress.done { stroke: var(--gold); }
.db-timer-display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  color: var(--teal);
  letter-spacing: 1px;
}
.db-timer-controls { display: flex; gap: 10px; }
.db-timer-btn {
  padding: 9px 22px;
  border-radius: 50px;
  border: 1.5px solid var(--sage);
  background: transparent;
  color: var(--sage);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.03em;
}
.db-timer-btn.primary { background: var(--sage); color: #fff; border-color: var(--sage); }
.db-timer-btn:hover { opacity: 0.85; }
.db-timer-done-msg {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 500;
  min-height: 1.1em;
  letter-spacing: 0.03em;
  text-align: center;
}

/* ── HOME BUTTON ── */
.db-home-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.12s;
  margin-top: auto;
}
.db-home-btn:hover { background: var(--sage); transform: translateY(-1px); }

/* ── ANIMATIONS ── */
.db-fade-up { animation: dbFadeUp 0.45s ease both; }
@keyframes dbFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.db-activity-btn:nth-child(1) { animation-delay: 0.05s; }
.db-activity-btn:nth-child(2) { animation-delay: 0.10s; }
.db-activity-btn:nth-child(3) { animation-delay: 0.15s; }
.db-activity-btn:nth-child(4) { animation-delay: 0.20s; }
.db-activity-btn:nth-child(5) { animation-delay: 0.25s; }
.db-activity-btn:nth-child(6) { animation-delay: 0.30s; }
.db-activity-btn:nth-child(7) { animation-delay: 0.35s; }

.db-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: dbPulseDot 2.4s ease-in-out infinite;
  margin-left: 4px;
  vertical-align: middle;
}
@keyframes dbPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}
