/* The in-Doc timer, the break popover and the break card, rebuilt from
 * overlay.js so the demo shows exactly what a person sees in their Doc.
 * Every value here is copied from the extension's own stylesheet
 * (overlay.js, buildTimerHTML and the two break hosts). If the extension
 * changes, change this with it.
 */

.hd-ov {
  position: absolute;
  right: 38px;
  bottom: 22px;
  z-index: 6;
  width: 220px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #0a0a0a;
  border: 1px solid #282828;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.88), 0 4px 20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
.hd-ov.on {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
}
.hd-ov *,
.hd-ov *::before,
.hd-ov *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.hd-ov [hidden],
.hd-away[hidden],
.hd-sb[hidden],
.hd-away [hidden],
.hd-sb [hidden] {
  /* A class with display: flex beats the browser's own rule for the hidden
     attribute, so say it here. Without this the break card sat over the Doc
     from the start. */
  display: none !important;
}
.hd-ov-top {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(62, 207, 142, 0.35) 35%, rgba(110, 231, 180, 0.25) 50%, rgba(62, 207, 142, 0.35) 65%, transparent);
}
.hd-ov-body {
  padding: 12px 14px;
}
.hd-ov-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.hd-ov-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}
.hd-ov-brand img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.hd-ov-name {
  font-size: 11px;
  font-weight: 600;
  color: #f2f2f2;
  letter-spacing: -0.22px;
}
.hd-ov-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: #f87171;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hd-ov-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f87171;
  animation: hdOvPulse 1.4s ease-in-out infinite;
}
@keyframes hdOvPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.12; }
}
.hd-ov.paused .hd-ov-badge { color: #e8b84b; }
.hd-ov.paused .hd-ov-dot { background: #e8b84b; animation: none; opacity: 1; }
.hd-ov.paused .hd-ov-time { opacity: 0.65; }
.hd-ov.away .hd-ov-badge { color: #7dd3fc; }
.hd-ov.away .hd-ov-dot { background: #38bdf8; animation: none; opacity: 1; }
.hd-ov.ended .hd-ov-dot { animation: none; opacity: 1; background: #3ecf8e; }
.hd-ov.ended .hd-ov-badge { color: #3ecf8e; }
.hd-ov.ended .hd-ov-sub,
.hd-ov.ended .hd-ov-pause,
.hd-ov.ended .hd-ov-sched,
.hd-ov.away .hd-ov-sched {
  display: none;
}
.hd-ov-time {
  font-size: 28px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #f2f2f2;
  letter-spacing: -1.8px;
  line-height: 1;
  margin-bottom: 2px;
  transition: color 0.35s ease;
  font-variant-numeric: tabular-nums;
}
.hd-ov-sub {
  font-size: 9px;
  color: #8e8e8e;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  margin-bottom: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hd-ov-pending {
  text-align: center;
  margin: -2px 0 8px;
}
.hd-ov-pending span {
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #a3a3a3;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.hd-ov.away .hd-ov-pending span { color: #7dd3fc; }
.hd-ov-track {
  height: 3px;
  background: #1f1f1f;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.hd-ov-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #1a7a4a, #3ecf8e, #6ee7b4);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.hd-ov-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.hd-ov-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: center;
}
.hd-ov-sv {
  font-size: 11px;
  font-weight: 500;
  color: #f2f2f2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.hd-ov-sk {
  font-size: 8px;
  color: #8e8e8e;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}
.hd-ov-sep {
  width: 1px;
  height: 18px;
  background: #282828;
}
.hd-ov-btns {
  display: flex;
  gap: 7px;
}
.hd-ov-pause {
  flex: 0 0 auto;
  padding: 7px 11px;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #b8b8b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hd-ov-pause:hover {
  background: #1a1a1a;
  border-color: #363636;
  color: #f2f2f2;
}
.hd-ov.paused .hd-ov-pause {
  color: #e8b84b;
  border-color: rgba(232, 184, 75, 0.32);
}
.hd-ov-stop {
  flex: 1;
  padding: 7px 9px;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #f87171;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.15s, border-color 0.15s;
}
.hd-ov-stop:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.22);
}
.hd-ov-end {
  margin-top: 9px;
  font-size: 10.5px;
  line-height: 1.45;
  color: #c8c8c8;
}
.hd-ov-sched {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #1f1f1f;
}
.hd-ov-sched-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: #111;
  color: #bae6fd;
  font-size: 11px;
  font-weight: 600;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.hd-ov-sched-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(125, 211, 252, 0.42);
  color: #e0f2fe;
}

/* The break length popover, beside the timer. */
.hd-sb {
  position: absolute;
  z-index: 7;
  width: 188px;
  background: #0a0a0a;
  border: 1px solid #1e3a4f;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.82), 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  animation: hdSbIn 0.18s ease-out;
}
@keyframes hdSbIn {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: translateX(0); }
}
.hd-sb-top {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(14, 116, 144, 0.5) 32%, rgba(56, 189, 248, 0.42) 50%, rgba(125, 211, 252, 0.35) 68%, transparent);
}
.hd-sb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 7px;
}
.hd-sb-title {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hd-sb-close {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hd-sb-close:hover { background: #111; color: #e0f2fe; border-color: #1f2937; }
.hd-sb-body {
  padding: 0 10px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.hd-sb-chip {
  padding: 10px 0;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #bae6fd;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.2px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.hd-sb-chip:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(125, 211, 252, 0.45);
  color: #e0f2fe;
}
.hd-sb-chip:active { transform: scale(0.97); }
.hd-sb-note {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.4;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* The break card, which covers the Doc while you are away. */
.hd-away {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.hd-away-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.hd-away-card {
  position: relative;
  width: min(340px, 92%);
  background: #0a0a0a;
  border: 1px solid #1e3a4f;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.88), 0 4px 20px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  animation: hdAwayIn 0.22s ease-out;
  text-align: center;
}
@keyframes hdAwayIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hd-away-body {
  padding: 22px 20px 26px;
}
.hd-away-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.hd-away-brand img { display: block; width: 22px; height: 22px; }
.hd-away-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hd-away-time {
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #e0f2fe;
  letter-spacing: -2px;
  margin: 10px 0 8px;
  text-shadow: 0 0 32px rgba(56, 189, 248, 0.22);
  font-variant-numeric: tabular-nums;
}
.hd-away-sub {
  font-size: 9px;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hd-away-minis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.hd-away-mini {
  font-size: 9px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #2f3f55;
  background: #111;
  color: #94a3b8;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.hd-away-mini:hover { color: #bae6fd; border-color: rgba(56, 189, 248, 0.38); background: #151515; }
.hd-away-actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  margin: 16px auto 0;
  max-width: 280px;
}
.hd-away-pause {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #bae6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hd-away-pause:hover { background: #1a1a1a; border-color: rgba(56, 189, 248, 0.35); color: #e0f2fe; }
.hd-away-end {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: #111;
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hd-away-end:hover { background: rgba(56, 189, 248, 0.1); border-color: rgba(125, 211, 252, 0.45); color: #fff; }

/* Small screens: the Doc is drawn at a reduced scale, and so is the card. */
@media (max-width: 720px) {
  .hd-ov {
    right: 12px;
    bottom: 12px;
    transform-origin: bottom right;
    scale: 0.82;
  }
}
