/**
 * Daily healing tools.
 *
 * Inherits the site's CSS variables where they exist, with fallbacks so
 * the plugin still looks right if the theme changes.
 */

.heal-card {
	background: var(--white, #fff);
	border: 1px solid var(--line, #E7DCEF);
	border-radius: 20px;
	padding: 28px;
	margin-bottom: 22px;
}
.heal-card-head { margin-bottom: 20px; }
.heal-card-head h3 { font-size: 1.25rem; margin: 0 0 6px; }
.heal-card-head p { color: var(--ink-soft, #6B6478); font-size: 0.93rem; line-height: 1.65; margin: 0; }

.heal-gate {
	background: var(--rust-pale, #EEE1F5);
	border-radius: 18px;
	padding: 26px;
	text-align: center;
}
.heal-gate p { color: var(--rust-deep, #5F3985); font-size: 0.95rem; line-height: 1.7; }

.heal-flash {
	border-radius: 12px;
	padding: 13px 18px;
	font-size: 0.9rem;
	margin-bottom: 18px;
}
.heal-flash-ok  { background: var(--gold-pale, #DFF1E3); color: var(--gold, #4E8A5F); }
.heal-flash-err { background: var(--sage-pale, #FBE3E0); color: #8A342A; }

.heal-crisis-quiet {
	font-size: 0.82rem;
	color: var(--ink-soft, #6B6478);
	margin: 18px 0 0;
	padding-top: 14px;
	border-top: 1px dashed var(--line, #E7DCEF);
}
.heal-crisis-quiet a { color: var(--rust-deep, #5F3985); font-weight: 600; }

/* ---------- Daily check-in ---------- */
.heal-mood-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	margin-bottom: 18px;
}
.heal-mood { position: relative; display: block; }
.heal-mood input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.heal-mood-inner {
	display: block;
	border: 1.5px solid var(--line, #E7DCEF);
	border-radius: 14px;
	padding: 14px;
	background: var(--white, #fff);
	transition: border-color 0.15s ease, background 0.15s ease;
	min-height: 92px;
}
.heal-mood input:checked + .heal-mood-inner {
	border-color: var(--rust, #7C4DA6);
	background: var(--rust-pale, #EEE1F5);
}
.heal-mood input:focus-visible + .heal-mood-inner {
	outline: 2px solid var(--rust, #7C4DA6);
	outline-offset: 2px;
}
.heal-mood-inner strong { display: block; font-size: 0.95rem; margin: 8px 0 3px; }
.heal-mood-inner em { display: block; font-style: normal; font-size: 0.78rem; color: var(--ink-soft, #6B6478); line-height: 1.45; }

.heal-dot {
	display: inline-block;
	width: 14px; height: 14px;
	border-radius: 50%;
	background: var(--line, #E7DCEF);
	flex-shrink: 0;
}

.heal-note-label {
	display: block;
	font-weight: 700;
	font-size: 0.88rem;
	margin-bottom: 7px;
}
.heal-note-label span { font-weight: 400; color: var(--ink-soft, #6B6478); }

.heal-mood-form textarea,
.heal-journal-form textarea,
.heal-journal-form input[type="text"] {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid var(--line, #E7DCEF);
	border-radius: 12px;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.7;
	background: var(--white, #fff);
	color: var(--ink, #2B2733);
	box-sizing: border-box;
	resize: vertical;
}
.heal-mood-form textarea:focus,
.heal-journal-form textarea:focus,
.heal-journal-form input[type="text"]:focus {
	outline: 2px solid var(--rust, #7C4DA6);
	outline-offset: 1px;
	border-color: var(--rust, #7C4DA6);
}
.heal-submit { margin-top: 14px; }

.heal-today-done {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: var(--cream-deep, #F3EAF7);
	border-radius: 14px;
	padding: 16px 18px;
}
.heal-today-done .heal-dot { margin-top: 4px; }
.heal-today-done strong { font-size: 0.98rem; }
.heal-today-note { font-size: 0.88rem; color: var(--ink-soft, #6B6478); margin: 6px 0 0; }

.heal-change { margin-top: 14px; }
.heal-change summary {
	cursor: pointer;
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--rust-deep, #5F3985);
}
.heal-change[open] summary { margin-bottom: 16px; }

/* ---------- History ---------- */
.heal-history { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line, #E7DCEF); }
.heal-history h4 { font-size: 0.95rem; margin: 0 0 12px; }
.heal-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.heal-dots .heal-dot { width: 16px; height: 16px; }
.heal-dots .heal-dot.is-empty {
	background: transparent;
	border: 1px dashed var(--line, #E7DCEF);
}
.heal-history-note {
	font-size: 0.82rem;
	color: var(--ink-soft, #6B6478);
	line-height: 1.65;
	margin: 0;
}

.heal-support {
	margin-top: 22px;
	background: #FFF4E8;
	border: 1px solid #E4A94F;
	border-radius: 14px;
	padding: 18px 20px;
}
.heal-support h4 { font-size: 0.98rem; margin: 0 0 8px; color: #8A5A12; }
.heal-support p { font-size: 0.88rem; color: #8A5A12; line-height: 1.7; margin: 0 0 10px; }
.heal-support-links a { color: #8A5A12; font-weight: 700; }

/* ---------- Journal ---------- */
.heal-prompt {
	background: var(--cream-deep, #F3EAF7);
	border-radius: 14px;
	padding: 18px 20px;
	margin-bottom: 20px;
}
.heal-prompt-label {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: var(--rust-deep, #5F3985);
	margin-bottom: 7px;
}
.heal-prompt p {
	font-family: 'Lora', Georgia, serif;
	font-size: 1.05rem;
	color: var(--ink, #2B2733);
	line-height: 1.5;
	margin: 0 0 14px;
}
.heal-prompt button {
	background: none;
	border: 1px solid var(--rust, #7C4DA6);
	color: var(--rust-deep, #5F3985);
	border-radius: 999px;
	padding: 7px 15px;
	font-size: 0.8rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	margin-right: 6px;
}
.heal-prompt button:hover { background: var(--rust-pale, #EEE1F5); }

.heal-label {
	display: block;
	font-weight: 700;
	font-size: 0.88rem;
	margin: 16px 0 7px;
}
.heal-label span { font-weight: 400; color: var(--ink-soft, #6B6478); }
.heal-journal-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.heal-entry {
	border-top: 1px solid var(--line, #E7DCEF);
	padding: 20px 0;
}
.heal-entry:first-of-type { border-top: none; padding-top: 4px; }
.heal-entry-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}
.heal-entry-head h4 { font-size: 1.05rem; margin: 0; }
.heal-entry-date { font-size: 0.78rem; color: var(--ink-soft, #6B6478); flex-shrink: 0; }
.heal-entry-prompt {
	font-size: 0.82rem;
	font-style: italic;
	color: var(--ink-soft, #6B6478);
	margin: 0 0 10px;
	padding-left: 12px;
	border-left: 2px solid var(--line, #E7DCEF);
}
.heal-entry-body { font-size: 0.95rem; line-height: 1.75; color: var(--ink, #2B2733); }
.heal-entry-body p { margin: 0 0 0.9em; }

.heal-entry-actions {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-top: 12px;
	font-size: 0.82rem;
}
.heal-entry-actions a { color: var(--rust-deep, #5F3985); font-weight: 700; text-decoration: none; }
.heal-delete-form { display: inline; }
.heal-delete-form button {
	background: none;
	border: none;
	padding: 0;
	font-family: inherit;
	font-size: 0.82rem;
	color: var(--ink-soft, #6B6478);
	cursor: pointer;
	text-decoration: underline;
}
.heal-delete-form button:hover { color: #B3261E; }

.heal-pager { display: flex; justify-content: space-between; margin-top: 18px; font-size: 0.85rem; }
.heal-pager a { color: var(--rust-deep, #5F3985); font-weight: 700; text-decoration: none; }

/* ---------- Breathing ---------- */
.heal-breathe-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px 0 10px;
}
.heal-breathe-circle {
	width: 150px;
	height: 150px;
	border-radius: 50%;
	background: radial-gradient(circle at 45% 40%, #FDEFF5, #C9B6E4 65%, #A3D9D0 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 4s ease-in-out;
	transform: scale(0.72);
	box-shadow: 0 12px 40px -16px rgba(124, 77, 166, 0.5);
}
.heal-breathe-stage[data-state="in"]   .heal-breathe-circle { transform: scale(1); }
.heal-breathe-stage[data-state="hold"] .heal-breathe-circle { transform: scale(1); }
.heal-breathe-stage[data-state="out"]  .heal-breathe-circle { transform: scale(0.72); }
.heal-breathe-stage[data-state="rest"] .heal-breathe-circle { transform: scale(0.72); }

.heal-breathe-word {
	font-family: 'Lora', Georgia, serif;
	font-size: 1.05rem;
	color: #3E3049;
	letter-spacing: 0.5px;
}
.heal-breathe-count {
	font-size: 0.85rem;
	color: var(--ink-soft, #6B6478);
	margin: 16px 0 0;
	min-height: 1.2em;
}
.heal-breathe-controls { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.heal-breathe-note {
	font-size: 0.8rem;
	color: var(--ink-soft, #6B6478);
	line-height: 1.65;
	margin: 20px 0 0;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.heal-breathe-circle { transition: none; transform: scale(0.9) !important; }
}

@media (max-width: 600px) {
	.heal-card { padding: 22px 18px; }
	.heal-mood-grid { grid-template-columns: 1fr 1fr; }
	.heal-breathe-circle { width: 130px; height: 130px; }
}
