/* =========================================================================
   SPANISHISH WORD PRACTICE — THEME VARIABLES
   -------------------------------------------------------------------------
   Everything below this block uses these variables instead of hard-coded
   colors/fonts. To match your site, you do NOT need to edit this file —
   just paste a small override snippet into
   Appearance > Customize > Additional CSS (see the plugin instructions).
   These are just the defaults used if nothing overrides them.
   ========================================================================= */
:root {
	--spanishish-font: inherit;
	--spanishish-accent: #2c3e50;      /* buttons, active level, borders on hover */
	--spanishish-accent-text: #ffffff; /* text color on top of the accent color */
	--spanishish-text: #222222;        /* main word / heading text color */
	--spanishish-muted-text: #555555;  /* translations, small labels */
	--spanishish-border: #dddddd;
	--spanishish-bg: #fafafa;          /* block/panel background */
	--spanishish-radius: 8px;
}

.spanishish-word-block,
.spanishish-word-list,
.spanishish-word-toggle {
	font-family: var(--spanishish-font);
}

/* ---------- Standalone / panel block ---------- */

.spanishish-word-block {
	border: 1px solid var(--spanishish-border);
	border-radius: var(--spanishish-radius);
	padding: 1.25rem 1.5rem;
	margin: 1.5rem 0;
	max-width: 480px;
	background: var(--spanishish-bg);
}

.spanishish-word-block--compact {
	margin: 0;
	max-width: none;
	border: none;
}

.spanishish-word-block--compact .spanishish-word-row {
	display: none; /* word is already shown in the list toggle button */
}

.spanishish-word-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.9rem;
}

.spanishish-word-text {
	font-size: 1.4rem;
	font-weight: 600;
	color: var(--spanishish-text);
}

.spanishish-speak-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	flex-shrink: 0;
	border: 1px solid var(--spanishish-accent);
	background: #fff;
	color: var(--spanishish-accent);
	border-radius: 50%;
	padding: 0;
	font-family: inherit;
	cursor: pointer;
}

.spanishish-speak-btn svg {
	width: 1rem;
	height: 1rem;
}

.spanishish-speak-btn:hover {
	background: var(--spanishish-accent);
	color: var(--spanishish-accent-text);
}

.spanishish-speak-btn-small {
	margin: 0 0.5rem;
	width: 1.5rem;
	height: 1.5rem;
}

.spanishish-speak-btn-small svg {
	width: 0.8rem;
	height: 0.8rem;
}

.spanishish-levels {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.spanishish-levels-label {
	font-size: 0.85rem;
	color: var(--spanishish-muted-text);
}

.spanishish-level-buttons {
	display: flex;
	gap: 0.4rem;
}

.spanishish-level-btn {
	border: 1px solid var(--spanishish-border);
	background: #fff;
	color: var(--spanishish-text);
	border-radius: 4px;
	padding: 0.25rem 0.65rem;
	font-size: 0.85rem;
	font-family: inherit;
	cursor: pointer;
}

.spanishish-level-btn.is-active {
	background: var(--spanishish-accent);
	color: var(--spanishish-accent-text);
	border-color: var(--spanishish-accent);
}

.spanishish-examples-list {
	font-size: 0.95rem;
}

.spanishish-examples-ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.spanishish-example-item {
	padding: 0.5rem 0;
	border-top: 1px solid var(--spanishish-border);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.2rem;
}

.spanishish-example-item:first-child {
	border-top: none;
}

.spanishish-example-es {
	font-weight: 600;
	color: var(--spanishish-text);
}

.spanishish-example-en {
	color: var(--spanishish-muted-text);
	font-style: italic;
	width: 100%;
}

.spanishish-loading,
.spanishish-error {
	font-size: 0.9rem;
	color: var(--spanishish-muted-text);
}

.spanishish-error {
	color: #a33;
}

/* ---------- Word list (vocabulary page) ---------- */

.spanishish-word-list {
	list-style: none;
	margin: 1.5rem 0;
	padding: 0;
	max-width: 640px;
}

.spanishish-word-list-item {
	border-bottom: 1px solid var(--spanishish-border);
}

.spanishish-word-list-item:first-child {
	border-top: 1px solid var(--spanishish-border);
}

.spanishish-word-list-item-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.spanishish-word-toggle {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	background: none;
	border: none;
	border-radius: var(--spanishish-radius);
	text-align: left;
	padding: 0.85rem 0.75rem;
	cursor: pointer;
	font-family: inherit;
}

.spanishish-word-toggle:hover {
	background: var(--spanishish-bg);
}

.spanishish-list-speak-btn {
	flex-shrink: 0;
}

.spanishish-word-toggle-word {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--spanishish-text);
}

.spanishish-word-toggle-translation {
	font-size: 0.95rem;
	color: var(--spanishish-muted-text);
	font-style: italic;
}

.spanishish-word-toggle-arrow {
	margin-left: auto;
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid var(--spanishish-muted-text);
	border-bottom: 2px solid var(--spanishish-muted-text);
	transform: rotate(45deg);
	transition: transform 0.15s ease;
	flex-shrink: 0;
}

.spanishish-word-list-item.is-open .spanishish-word-toggle-arrow {
	transform: rotate(-135deg);
}

.spanishish-word-panel {
	padding: 0 0.25rem 1rem;
	background: var(--spanishish-bg);
	border-radius: var(--spanishish-radius);
}

.spanishish-word-panel[hidden] {
	display: none;
}

/* ---------- Letter navigation (prev/next + back to hub) ---------- */

.spanishish-letter-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 2rem 0;
	flex-wrap: wrap;
}

.spanishish-letter-nav-link {
	color: var(--spanishish-accent);
	text-decoration: none;
	font-size: 0.9rem;
}

.spanishish-letter-nav-link:hover {
	text-decoration: underline;
}

.spanishish-letter-nav-hub {
	color: var(--spanishish-muted-text);
	text-align: center;
	flex: 1;
}

.spanishish-letter-nav-next {
	text-align: right;
}

@media (max-width: 560px) {
	.spanishish-letter-nav {
		justify-content: center;
		text-align: center;
	}

	.spanishish-letter-nav-hub {
		order: -1;
		flex-basis: 100%;
	}
}
