/* Free try without logging in (templates/index.html, try_essay.py): the locked preview behind frosted glass,
   and the shareable score card button. */

/* ---------- what was found (readable) ---------- */
.try-found { margin: 0 0 8px; font-size: 13.5px; color: #4b5068; }
.try-found b { color: #0f1222; font-size: 15px; }
.try-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.try-count { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #fef2f2; color: #b91c1c; }
.try-count b { font-size: 13px; }
.try-count.try-repetition { background: #fffbeb; color: #b45309; }

/* ---------- frosted glass ---------- */
.try-glass { position: relative; border-radius: 18px; overflow: hidden; isolation: isolate; }
.try-blur { filter: blur(4.5px); user-select: none; -webkit-user-select: none; pointer-events: none; max-height: 460px; overflow: hidden; }
.try-blur .err-mark { cursor: default; border-radius: 5px; }
/* Stronger colours under the blur, so the red and yellow highlights still show through the glass. */
.try-blur .err-grammar, .try-blur .err-spelling, .try-blur .err-punctuation { background: rgba(239, 68, 68, .45); color: #b91c1c; }
.try-blur .err-repetition, .try-blur .err-vocabulary { background: rgba(245, 158, 11, .5); color: #92400e; }
.try-lock { position: absolute; inset: 0; z-index: 2; display: grid; place-items: start center; padding: 24px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .55)); }
.try-lock-card { width: 100%; max-width: 320px; display: grid; justify-items: center; gap: 8px; padding: 18px 16px; border-radius: 22px; text-align: center;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 24px 50px -24px rgba(49, 46, 129, .55), inset 0 1px 0 rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
.try-lock-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #4f46e5, #6366f1 55%, #0ea5e9); box-shadow: 0 10px 20px -10px #4f46e5; }
.try-lock-title { margin: 2px 0 0; font-size: 15.5px; font-weight: 800; color: #0f1222; line-height: 1.3; }
.try-lock-text { margin: 0; font-size: 12.5px; line-height: 1.5; color: #4b5068; }
.try-lock-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin-top: 4px; padding: 0 16px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #229ed9, #1d8bc4); color: #fff; font: 700 14px/1 Inter, system-ui, sans-serif; cursor: pointer; box-shadow: 0 12px 24px -14px #1d8bc4; }
.try-lock-btn:active { transform: scale(.98); }

/* Computer: a slim one-row card, so more of the coloured essay shows under the glass. */
@media (min-width: 1024px) {
  .try-lock-card { max-width: 600px; grid-template-columns: 44px 1fr auto; grid-template-areas: "icon title btn" "icon text btn";
    align-items: center; justify-items: start; column-gap: 14px; row-gap: 2px; padding: 14px 16px; text-align: left; }
  .try-lock-icon { grid-area: icon; }
  .try-lock-title { grid-area: title; margin: 0; }
  .try-lock-text { grid-area: text; }
  .try-lock-btn { grid-area: btn; width: auto; margin: 0; white-space: nowrap; }
}

/* The preview has no PDF and no sentence switch. */
.is-try #exportBtn, .is-try #sentenceToggle { display: none !important; }

html[data-theme="dark"] .try-found { color: #a3a9cf; }
html[data-theme="dark"] .try-found b { color: #eef0ff; }
html[data-theme="dark"] .try-count { background: rgba(248, 113, 113, .14); color: #fca5a5; }
html[data-theme="dark"] .try-count.try-repetition { background: rgba(251, 191, 36, .14); color: #fcd34d; }
html[data-theme="dark"] .try-lock { background: linear-gradient(180deg, rgba(11, 13, 31, .1), rgba(11, 13, 31, .5)); }
html[data-theme="dark"] .try-lock-card { background: rgba(21, 27, 69, .72); border-color: rgba(129, 140, 248, .3); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8); }
html[data-theme="dark"] .try-lock-title { color: #eef0ff; }
html[data-theme="dark"] .try-lock-text { color: #a3a9cf; }

/* ---------- "Free try" badge on the IELTS Task 2 button, for visitors who are not logged in ---------- */
[data-ml-mode="ielts"] { position: relative; }
.aura-free-badge { display: none; position: absolute; top: -9px; right: 8px; padding: 2px 8px; border-radius: 999px;
  background: #16a34a; color: #fff; font-size: 10px; font-weight: 800; line-height: 1.5; letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 4px 10px -4px rgba(22, 163, 74, .8), 0 0 0 2px #fff; pointer-events: none; }
.is-visitor .aura-free-badge { display: inline-block; }
html[data-theme="dark"] .aura-free-badge { background: #22c55e; box-shadow: 0 4px 10px -4px rgba(34, 197, 94, .8), 0 0 0 2px #0b0d1f; }

/* ---------- score card button (next to Share) ---------- */
.aura-share-card { display: inline-flex; align-items: center; gap: 6px; }
