/* ============================================
   lwriter — web preview styles
   Hides desktop-only chrome and styles the
   "get the real app" gate. Uses the app's own
   CSS variables so light/dark just work.
   ============================================ */

/* No window to minimize/close, no disk-backed sidebar */
.web-app #btn-minimize,
.web-app #btn-maximize,
.web-app #btn-close,
.web-app #btn-sidebar { display: none !important; }

/* Settings rows that reach into the filesystem */
.web-app .settings-row:has(#btn-open-notes-dir),
.web-app .settings-row:has(#system-font),
.web-app .settings-row:has(#pick-font) { display: none !important; }

/* "web preview" tag in the titlebar */
#web-tag {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--ui-font);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
#web-tag:hover { color: var(--accent); border-color: var(--accent); }
.web-app #titlebar { position: relative; }

/* ---------- download gate ---------- */
#web-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.35);
  animation: gate-fade 0.2s ease-out;
}

@keyframes gate-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.web-gate-card {
  position: relative;
  width: min(26rem, 100%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  padding: 1.8rem 1.8rem 1.5rem;
  animation: gate-rise 0.25s ease-out;
}

@keyframes gate-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.web-gate-card h2 {
  font-family: var(--ui-font);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.6rem;
}

.web-gate-card p {
  font-family: var(--ui-font);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 1.2rem;
}

.web-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.web-gate-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 9px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.web-gate-btn span {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 2px;
}

.web-gate-btn.primary { background: var(--accent); color: #fff; }
.web-gate-btn.primary:hover { filter: brightness(0.92); }

.web-gate-btn.ghost {
  border-color: var(--border);
  color: var(--text);
}
.web-gate-btn.ghost:hover { background: var(--hover); }

.web-gate-btn.disabled {
  border: 1px dashed var(--border);
  color: var(--text-muted);
  cursor: default;
}

.web-gate-more {
  display: block;
  font-family: var(--ui-font);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  text-align: center;
}
.web-gate-more:hover { color: var(--accent); }

.web-gate-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: default;
  transition: background 0.15s ease, color 0.15s ease;
}
.web-gate-close:hover { background: var(--hover); color: var(--text); }
