/* ==========================================================================
   User-area design overrides
   Loaded LAST (after the design's style.css and the site style.css).

   Purpose:
   1. Keep the current app's Quicksand type scale on the new ll- components
      (the global "font-family: var(--primary-font) !important" rule already
      keeps Quicksand; here we only rein the design's large clamp() sizes back
      to the sizes the app used before).
   2. Add Bootstrap-style moving diagonal stripes ON TOP of the design's
      grow-from-0 progress animation (so the bars both grow and shimmer).
   ========================================================================== */

/* ---------- Typography: match the previous app sizing ---------- */

/* Home — welcome heading matches the old .user-h1 (22px) */
.ll-welcome-copy h1 { font-size: 20px; line-height: 1.2; }
.ll-welcome-copy p  { font-size: 1rem; }

/* Home — course level + unit label */
.ll-course-progress-card h2   { font-size: 1.2rem; }
.ll-course-progress-card span { font-size: 1rem; }

/* Home — module card titles */
.ll-module-content h3 { font-size: 1rem; }

/* Topic page — hero heading + activity titles */
.ll-lesson-hero h1      { font-size: 22px; line-height: 1.2; }
.ll-activity-content h2 { font-size: 1.1rem; }

/* Quiz screens — lesson title */
.quiz-title { font-size: 1rem; }

/* Profile — card headings */
.ll-card-hero h1,
.ll-card-hero h2 { font-size: 1.25rem; }

/* Progress-bar numeric labels stay compact, as before */
.ll-progress-bar,
.ll-quiz-progress-bar { font-size: 0.8rem; }

/* ---------- DB images inside the design's emoji thumb slots ---------- */
/* The design used emoji in these tiles; we drop real DB images in, so size them. */
.ll-activity-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.ll-lesson-hero-art img {
	width: clamp(96px, 31vw, 160px);
	height: auto;
	object-fit: contain;
	mix-blend-mode: multiply;
}

/* ---------- Locked activity (lesson) rows on the topic page ---------- */
.ll-activity-card-locked {
	opacity: 0.55;
	pointer-events: none;
	cursor: default;
}
.ll-activity-card-locked .ll-round-arrow {
	background: #EEF0F3;
	color: var(--ll-muted);
	font-size: 1.2rem;
}

/* ==========================================================================
   Quiz / exercise screens (single_lesson.php templates)
   The templates keep their original functional class names (their JS depends
   on them); these rules restyle those elements to match the new design.
   ========================================================================== */

/* Small prompt label above the task card ("New Word", "What do you hear?"...) */
.ll-quiz-prompt {
	text-align: center;
	font-weight: 800;
	color: var(--ll-muted);
	margin: 4px 0 14px;
}

/* Generic single-column option (audio_exercise, lesson_review) */
.option {
	cursor: pointer;
	padding: 15px 18px;
	border-radius: 16px;
	margin-bottom: 12px;
	background: #fff;
	border: 2px solid var(--ll-border) !important;
	font-weight: 700;
	transition: border-color .2s ease, background .2s ease, transform .12s ease;
}
.option:hover  { background: var(--ll-soft-blue); }
.option.selected { border-color: var(--ll-blue) !important; background: var(--ll-soft-blue); }
.option.correct  { border-color: var(--ll-green) !important; background: var(--ll-soft-green); }

/* Select-the-correct-answer image cards */
.card-option {
	cursor: pointer;
	border: 2px solid var(--ll-border);
	border-radius: 18px;
	transition: border-color .2s ease, transform .12s ease;
}
.card-option.selected { border-color: var(--ll-blue); }
.card-option.correct  { border-color: var(--ll-green); background: var(--ll-soft-green); }
.card-option img { width: 100px; height: 100px; object-fit: contain; margin-bottom: 8px; mix-blend-mode: multiply; }

/* Translate-the-sentence — word tiles + answer zone */
.word-tile {
	display: inline-block;
	margin: 5px;
	padding: 10px 16px;
	background: #fff;
	border: 2px solid var(--ll-border);
	border-radius: 999px;
	cursor: pointer;
	font-weight: 800;
	transition: background .15s ease, transform .12s ease;
}
.word-tile:hover { background: var(--ll-soft-blue); }
#selectedWords {
	min-height: 56px;
	border: 2px dashed var(--ll-border);
	border-radius: 16px;
	padding: 10px;
	margin-bottom: 18px;
}

/* Match game */
.match-item {
	height: 100%;
	cursor: pointer;
	border: 2px solid var(--ll-border) !important;
	border-radius: 16px !important;
	transition: border-color .15s ease, background .15s ease;
}
.match-item.selected { border-color: var(--ll-blue) !important; background: var(--ll-soft-blue); }
.match-item.matched  { opacity: .45; pointer-events: none; }
.image-item { width: 115px; height: 115px; object-fit: cover; border-radius: 10px; display: block; margin: 0 auto; mix-blend-mode: multiply; }
.word-item  { font-weight: 800; min-height: 115px; display: flex; align-items: center; justify-content: center; background: transparent; }

/* Conversation bubbles */
.conversation-box { text-align: left; }
.bubble { padding: 12px 16px; border-radius: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.left .bubble  { background: var(--ll-soft-blue);  border-top-left-radius: 4px; }
.right .bubble { background: var(--ll-soft-green); border-top-right-radius: 4px; }
.line { display: flex; margin-bottom: 6px; }
.left  { justify-content: flex-start; }
.right { justify-content: flex-end; }
.newLine { margin-bottom: 14px; }
.play-audio { cursor: pointer; color: var(--ll-blue); }
.engTxt, .engTxt2 { font-size: .8rem; color: var(--ll-muted); }
.engTxt2 { text-align: right; }

/* New-word audio option rows */
.ll-nw-option .bnc_anim { text-align: left; }

/* Result / feedback text under the options */
#result { margin-top: 14px; font-weight: 800; text-align: center; }


/* ---------- Progress bars: grow (from main.js) + moving stripes ---------- */
/* The design bars already paint static diagonal stripes as their first
   background layer; we animate that layer's position to make them travel,
   the way Bootstrap's .progress-bar-animated does. The solid gradient (2nd
   layer) is held still by giving it a fixed 0 0 position. */
.ll-progress-bar,
.ll-quiz-progress-bar {
	background-position: 16px 0, 0 0;
	animation: ll-progress-stripes 1s linear infinite;
}

@keyframes ll-progress-stripes {
	from { background-position: 16px 0, 0 0; }
	to   { background-position: 0 0,    0 0; }
}

/* Respect reduced-motion: no travelling stripes (grow is also disabled in main.js) */
@media (prefers-reduced-motion: reduce) {
	.ll-progress-bar,
	.ll-quiz-progress-bar {
		animation: none;
		background-position: 0 0, 0 0;
	}
}

/* ==========================================================================
   Guest trial ("Try the app")
   ========================================================================== */

/* Dashboard cards for topics outside the free trial: look locked but are
   tappable — tapping opens the Sign Up / Login prompt. */
.ll-module-card-trial { cursor: pointer; }
.ll-module-card-trial .ll-trial-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-size: 0.8rem;
	font-weight: 800;
	color: var(--ll-blue);
}
.ll-module-card-trial .ll-lock-badge { background: var(--ll-blue); }

/* Small "you're in trial mode" note under the welcome heading */
.ll-guest-note {
	display: inline-block;
	margin-top: 8px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--ll-soft-yellow);
	color: var(--ll-navy);
	font-size: 0.85rem;
	font-weight: 800;
}
.ll-guest-note a { color: var(--ll-blue); text-decoration: none; }

/* In-app Sign Up / Login prompt (users/includes/auth-prompt.php) */
.ll-auth-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(11, 24, 51, 0.55);
	z-index: 70;
	animation: ll-auth-fade 0.25s ease;
}

.ll-auth-modal {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(92vw, 400px);
	padding: 28px 24px 18px;
	background: var(--ll-card);
	border-radius: var(--ll-radius-lg);
	box-shadow: var(--ll-shadow);
	text-align: center;
	z-index: 71;
	animation: ll-auth-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ll-auth-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	border: 1px solid var(--ll-border);
	background: #fff;
	color: var(--ll-text);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

.ll-auth-emoji { font-size: 2.6rem; margin-bottom: 8px; }

.ll-auth-modal h2 {
	font-size: 1.35rem;
	font-weight: 900;
	color: var(--ll-navy);
	letter-spacing: -0.02em;
	margin-bottom: 6px;
}

.ll-auth-modal p {
	color: var(--ll-muted);
	font-size: 0.95rem;
	margin-bottom: 18px;
}

.ll-auth-later {
	margin-top: 12px;
	border: none;
	background: transparent;
	color: var(--ll-muted);
	font-weight: 700;
	font-size: 0.9rem;
	cursor: pointer;
	text-decoration: underline;
}

body.auth-open { overflow: hidden; }

@keyframes ll-auth-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ll-auth-pop {
	from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
	to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.ll-auth-backdrop, .ll-auth-modal { animation: none; }
}

/* ============================================================
   Feedback page (users/feedback.php)
   ============================================================ */
.ll-feedback-textarea {
	min-height: 160px;
	padding: 14px 16px;
	border-radius: 16px;
	border: 1px solid var(--ll-border);
	color: var(--ll-text);
	font-size: 1.05rem;
	font-weight: 600;
	resize: vertical;
	box-shadow: none;
}
.ll-feedback-textarea:focus {
	border-color: rgba(20, 107, 255, 0.45);
	box-shadow: 0 0 0 4px rgba(20, 107, 255, 0.12);
}
.ll-feedback-count { text-align: right; }
.ll-feedback-count.is-near { color: var(--ll-red); }

.ll-feedback-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}
.ll-feedback-item {
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--ll-border);
	border-radius: var(--ll-radius-sm);
}
.ll-feedback-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	color: var(--ll-muted);
	font-size: 0.86rem;
	font-weight: 700;
}
.ll-feedback-body {
	margin: 0;
	color: var(--ll-text);
	font-weight: 600;
	overflow-wrap: anywhere;
}
.ll-feedback-badge {
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 800;
}
.ll-feedback-badge.is-sent    { background: var(--ll-soft-green);  color: var(--ll-green); }
.ll-feedback-badge.is-pending { background: var(--ll-soft-yellow); color: #9A6B00; }
.ll-feedback-badge.is-failed  { background: var(--ll-soft-red);    color: var(--ll-red); }
