/* Daily tools - shared view (SD_Daily_Page_V3). Colours, panels and buttons come from the Fast theme. */
.sdd { --sdd-accent: #2f7d4f; max-width: 760px; margin: 1.5rem auto; text-align: left; }
.sdd * { box-sizing: border-box; }
.sdd [hidden] { display: none !important; }

/* The card: picture on the back, the text on the front; turns over once revealed. */
.sdd__card { display: grid; perspective: 1400px; margin: 0 0 14px; }
.sdd__face { grid-area: 1 / 1; min-height: 260px; border-radius: 14px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.sdd .sdd__face--back { position: relative; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: #1d2b22; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); line-height: normal; white-space: normal; }
.sdd__face--back img { display: block; width: 100%; height: 100%; min-height: 260px; object-fit: cover; border: 0; margin: 0; }
.sdd__hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: rgba(0, 0, 0, .66); color: #fff; font-weight: 700; font-size: 1rem; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.sdd__hint-icon { color: #ffd78a; }
.sdd__face--back:hover .sdd__hint, .sdd__face--back:focus-visible .sdd__hint { background: var(--sdd-accent); }
.sdd__face--back:focus-visible { outline: 3px solid var(--sdd-accent); outline-offset: 3px; }
.sdd__face--front { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: clamp(22px, 5vw, 44px); background: var(--bg-alt); border: 1px solid var(--border); border-top: 6px solid var(--sdd-accent); transform: rotateY(180deg); }
.sdd__kicker { margin: 0; font-size: .85em; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--sdd-accent); }
.sdd__text { margin: 0; padding: 0; border: 0; font-size: clamp(1.25rem, 3.4vw, 1.75rem); line-height: 1.45; font-style: normal; color: var(--text-bold, var(--text)); transition: opacity .25s; }
.sdd__text:focus { outline: none; }
.sdd.is-turning .sdd__text { opacity: 0; }
.sdd--js.is-revealed .sdd__face--back { transform: rotateY(-180deg); pointer-events: none; }
.sdd--js.is-revealed .sdd__face--front { transform: rotateY(0deg); }
/* Without JavaScript: the text, no card to turn. */
.sdd:not(.sdd--js) .sdd__face--back { display: none; }
.sdd:not(.sdd--js) .sdd__face--front { transform: none; }
@media (prefers-reduced-motion: reduce) {
	.sdd__face { transition: none; }
	.sdd__text { transition: none; }
}

.sdd__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.sdd__actions .button { margin: 0; }
.sdd__personal { display: grid; gap: 10px; margin: 0 0 12px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-alt); }
.sdd__personal p { margin: 0; }
.sdd__personal label { display: grid; gap: 4px; margin: 0; font-weight: 700; }
.sdd__personal input[type="date"] { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: .375em; font: inherit; height: 2.75em; padding: 0 1em; }
.sdd .sdd__check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; cursor: pointer; }
/* The theme hides checkboxes behind a label it draws; this one stays native. */
.sdd .sdd__check input[type="checkbox"] { -webkit-appearance: auto; appearance: auto; display: inline-block; float: none; position: static; opacity: 1; z-index: auto; width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--sdd-accent); }
.sdd__small { margin: 0; font-size: .85em; color: var(--text-muted); }
.sdd__status { min-height: 1.2em; margin: 0 0 10px; font-size: .92em; }

.sdd__share { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: start; margin: 14px 0; padding: 16px; border: 1px solid var(--border); border-radius: 10px; }
.sdd__share-preview { aspect-ratio: 1080 / 1350; border-radius: 8px; overflow: hidden; background: var(--bg-alt); border: 1px solid var(--border); }
.sdd__share-preview img { display: block; width: 100%; height: auto; }
.sdd__share-controls { display: grid; gap: 10px; align-content: start; }
.sdd__share-controls h3 { margin: 0; }
.sdd__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.sdd__buttons .button { margin: 0; }
.sdd__buttons a[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.sdd__days { margin: 14px 0; padding: 14px 16px; border-left: 4px solid var(--sdd-accent); background: var(--bg-alt); border-radius: 0 10px 10px 0; }
.sdd__days h3 { margin: 0 0 6px; font-size: 1.05em; }
.sdd__days ul { margin: 0; padding-left: 18px; }
.sdd__days li { margin: 4px 0; }
.sdd__countdown { margin: 10px 0; font-weight: 700; color: var(--sdd-accent); }
.sdd__more { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.sdd__more h3 { margin: 0 0 6px; font-size: 1.05em; }
.sdd__more ul { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; }

@media (max-width: 640px) {
	.sdd__share { grid-template-columns: 1fr; }
	.sdd__share-preview { max-width: 260px; width: 100%; margin: 0 auto; }
	.sdd__face, .sdd__face--back img { min-height: 220px; }
}

/* Dark scheme (the theme's switch): the tool colour lighter, so text in it stays readable. */
:root[data-theme="dark"] .sdd { --sdd-ink: color-mix(in srgb, var(--sdd-accent) 55%, #fff); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .sdd { --sdd-ink: color-mix(in srgb, var(--sdd-accent) 55%, #fff); }
}
.sdd__kicker, .sdd__countdown { color: var(--sdd-ink, var(--sdd-accent)); }
