/**
 * Default storefront styling for the care plan offer, the order confirmation
 * and My Account > My Jewelry Box.
 *
 * Every rule is scoped under `.reshyne-care-plan` or `.reshyne-care-plan-box`
 * and inherits the theme's font. The product page offer derives its colours
 * from the surrounding text: its only literal colours are neutral greys
 * expressed as translucent `rgba()`, which read correctly over a light or a dark
 * page, and emphasis is drawn with `currentColor`. The order confirmation and
 * the jewelry box are white cards with their own dark text and a dark button,
 * so they read the same on any page background. No brand colour is hardcoded.
 * Override these classes from your theme stylesheet, or copy the templates into
 * your theme, to change the look.
 */

.reshyne-care-plan {
	box-sizing: border-box;
	margin: 16px 0;
	padding: 16px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	background: rgba(128, 128, 128, 0.04);
	color: inherit;
	font: inherit;
	font-size: 14px;
	line-height: 1.45;
}

.reshyne-care-plan__heading {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
}

/* Themes routinely size bare svg to the full column width. */
.reshyne-care-plan__icon {
	flex: none;
	width: 14px;
	height: 14px;
}

.reshyne-care-plan__subtitle {
	margin: 4px 0 0;
	font-size: 12px;
	opacity: 0.75;
}

/* The radio group. Reset only, so the options keep the card's own rhythm:
   themes leave fieldset borders and padding in place otherwise, and a flex row
   inside a fieldset needs min-width 0 to be allowed to shrink. */
.reshyne-care-plan__plans {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

/* The heading above the card already names the offer, so the group label is
   for assistive technology only. */
.reshyne-care-plan__legend {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	border: 0;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Plan row: the radio and the plan name on the left, price pinned right.
   The row is boxed so the shopper reads it as the action, not as more copy. */
.reshyne-care-plan__plan {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 0 0;
	padding: 10px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	cursor: pointer;
}

/* Drawn by hand rather than left to `accent-color`, because themes reset
   `appearance` and stretch bare inputs to full width, and because a native
   accent would pull in a colour this card deliberately does not own. */
.reshyne-care-plan__check {
	display: inline-grid;
	flex: none;
	box-sizing: border-box;
	place-content: center;
	width: 16px;
	min-width: 16px;
	height: 16px;
	margin: 0;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 3px;
	background: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.reshyne-care-plan__check::after {
	content: "";
	width: 9px;
	height: 5px;
	border-bottom: 2px solid currentColor;
	border-left: 2px solid currentColor;
	opacity: 0;
	transform: rotate(-45deg) translateY(-1px);
}

.reshyne-care-plan__check:checked::after {
	opacity: 1;
}

/* The radio variant of the box above, declared after it so the round corners
   and the dot win: a dot inside a circle, in `currentColor`, revealed by the
   shared `:checked` rule. */
.reshyne-care-plan__radio {
	border-radius: 50%;
}

.reshyne-care-plan__radio::after {
	width: 8px;
	height: 8px;
	border: 0;
	border-radius: 50%;
	background: currentColor;
	transform: none;
}

.reshyne-care-plan__name {
	font-size: 13px;
	font-weight: 500;
}

.reshyne-care-plan__price {
	margin-left: auto;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.reshyne-care-plan__disclosure {
	margin: 8px 0 0;
	font-size: 12px;
}

/* The native marker is hidden so every browser draws the same chevron: it
   points down when closed and flips up when open. It is drawn in
   `currentColor`, so it follows the card's or the page's text colour. */
.reshyne-care-plan__disclosure > summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-radius: 3px;
	font-weight: 500;
	list-style: none;
	cursor: pointer;
}

.reshyne-care-plan__disclosure > summary::-webkit-details-marker {
	display: none;
}

.reshyne-care-plan__disclosure > summary::after {
	content: "";
	flex: none;
	width: 5px;
	height: 5px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s ease;
}

.reshyne-care-plan__disclosure[open] > summary::after {
	transform: translateY(1px) rotate(225deg);
}

.reshyne-care-plan__disclosure > summary:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.reshyne-care-plan__disclosure > summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.reshyne-care-plan__disclosure > summary::after {
		transition: none;
	}
}

.reshyne-care-plan__description,
.reshyne-care-plan__duration {
	margin: 6px 0 0;
	font-size: 12px;
	opacity: 0.75;
}

/* The description is merchant authored HTML, so it may bring its own blocks. */
.reshyne-care-plan__description > :first-child {
	margin-top: 0;
}

.reshyne-care-plan__description > :last-child {
	margin-bottom: 0;
}

/* Shared look of the white cards: order confirmation, dashboard card and the
   jewelry box items. Custom properties so a theme can retune all of them at
   once from `:root` or any ancestor. */
.reshyne-care-plan--confirmation,
.reshyne-care-plan--jewelry-box,
.reshyne-care-plan-box {
	--reshyne-care-plan-card-bg: #fff;
	--reshyne-care-plan-card-text: #1a1a1a;
	--reshyne-care-plan-card-border: rgba(0, 0, 0, 0.1);
	--reshyne-care-plan-tint: #f5f3ef;
	--reshyne-care-plan-button-bg: #1a1a1a;
	--reshyne-care-plan-button-text: #fff;
	--reshyne-care-plan-covered-bg: #eef7f0;
	--reshyne-care-plan-covered-border: #b9dcc3;
	--reshyne-care-plan-covered-text: #1d6b37;
	--reshyne-care-plan-ended-bg: #f4f4f4;
	--reshyne-care-plan-ended-border: rgba(0, 0, 0, 0.12);
	--reshyne-care-plan-ended-text: #5c5c5c;
	--reshyne-care-plan-muted: rgba(0, 0, 0, 0.55);
}

.reshyne-care-plan--confirmation,
.reshyne-care-plan--jewelry-box {
	margin: 24px 0;
	padding: 20px;
	border-color: var(--reshyne-care-plan-card-border);
	background: var(--reshyne-care-plan-card-bg);
	color: var(--reshyne-care-plan-card-text);
}

.reshyne-care-plan__title {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.reshyne-care-plan__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Confirmation card: one per covered product, a light lavender tint with a
   hairline border, the "<plan> registered" title over a two column list of
   facts, then the email notice. */
.reshyne-care-plan--confirmation {
	--reshyne-care-plan-registered-bg: #f6f4fb;
	--reshyne-care-plan-registered-border: rgba(76, 60, 140, 0.16);
}

.reshyne-care-plan__item {
	box-sizing: border-box;
	margin: 0 0 12px;
	padding: 16px 18px;
	border: 1px solid var(--reshyne-care-plan-registered-border);
	border-radius: 8px;
	background: var(--reshyne-care-plan-registered-bg);
}

.reshyne-care-plan__item:last-child {
	margin-bottom: 0;
}

.reshyne-care-plan__item-title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

/* Label above value, two per row; one column on narrow phones. */
.reshyne-care-plan__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 16px;
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

.reshyne-care-plan__fact {
	min-width: 0;
}

/* "Covers" takes a row of its own, so a long product name has room and the
   term and date cells stay side by side below it. */
.reshyne-care-plan__fact--wide {
	grid-column: 1 / -1;
}

.reshyne-care-plan__fact dt {
	margin: 0 0 2px;
	color: var(--reshyne-care-plan-muted);
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.reshyne-care-plan__fact dd {
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	overflow-wrap: anywhere;
}

@media (max-width: 399px) {
	.reshyne-care-plan__facts {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Email notice with a small envelope: inside the card for one plan, after the
   cards for several. */
.reshyne-care-plan__email {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 14px 0 0;
	color: var(--reshyne-care-plan-muted);
	font-size: 12px;
	line-height: 1.45;
}

.reshyne-care-plan__email-icon {
	flex: none;
	width: 14px;
	height: 14px;
	margin-top: 1px;
}

.reshyne-care-plan__note {
	margin: 12px 0 0;
	font-size: 13px;
	opacity: 0.75;
}

.reshyne-care-plan--jewelry-box .reshyne-care-plan__note {
	margin: 0 0 16px;
}

/* Dark, rounded, full width. The anchors keep the theme's `.button` class;
   these selectors outrank WooCommerce's own `.woocommerce a.button`, and a
   theme restyles them by targeting the plugin classes. */
.reshyne-care-plan a.button.reshyne-care-plan__button,
.reshyne-care-plan-box a.button.reshyne-care-plan-box__button {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 16px 0 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--reshyne-care-plan-button-bg);
	color: var(--reshyne-care-plan-button-text);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}

.reshyne-care-plan--jewelry-box a.button.reshyne-care-plan__button {
	margin-top: 0;
}

/* Dashboard card: the buttons stack full width, primary first. */
.reshyne-care-plan__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.reshyne-care-plan a.button.reshyne-care-plan__button:hover,
.reshyne-care-plan a.button.reshyne-care-plan__button:focus-visible,
.reshyne-care-plan-box a.button.reshyne-care-plan-box__button:hover,
.reshyne-care-plan-box a.button.reshyne-care-plan-box__button:focus-visible {
	background: var(--reshyne-care-plan-button-bg);
	color: var(--reshyne-care-plan-button-text);
	opacity: 0.85;
}

/* Outlined secondary button on the same shape as the primary one; the inset
   shadow draws the outline without changing its size. Declared after the
   shared hover rule, which has the same specificity. */
.reshyne-care-plan a.button.reshyne-care-plan__button--secondary,
.reshyne-care-plan a.button.reshyne-care-plan__button--secondary:hover,
.reshyne-care-plan a.button.reshyne-care-plan__button--secondary:focus-visible {
	background: transparent;
	box-shadow: inset 0 0 0 1px var(--reshyne-care-plan-button-bg);
	color: var(--reshyne-care-plan-button-bg);
}

/* My Account > My Jewelry Box. The wrapper is not a card itself, only the
   items are: one column on phones, two per row from tablet width up. */
.reshyne-care-plan-box {
	box-sizing: border-box;
	font: inherit;
	font-size: 14px;
	line-height: 1.45;
}

.reshyne-care-plan-box__intro,
.reshyne-care-plan-box__help,
.reshyne-care-plan-box__empty {
	margin: 0 0 16px;
	opacity: 0.75;
}

.reshyne-care-plan-box__help {
	margin: 16px 0 0;
	font-size: 13px;
}

.reshyne-care-plan-box__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.reshyne-care-plan-box__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.reshyne-care-plan-box__card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--reshyne-care-plan-card-border);
	border-radius: 8px;
	background: var(--reshyne-care-plan-card-bg);
	color: var(--reshyne-care-plan-card-text);
}

/* Header row: a small square thumbnail beside the product name and order. */
.reshyne-care-plan-box__header {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 16px 16px 0;
}

.reshyne-care-plan-box__media {
	flex: none;
	width: 72px;
	height: 72px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--reshyne-care-plan-tint);
}

.reshyne-care-plan-box__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.reshyne-care-plan-box__heading {
	flex: 1;
	min-width: 0;
}

.reshyne-care-plan-box__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 0 16px 16px;
}

.reshyne-care-plan-box__product {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	overflow-wrap: anywhere;
}

.reshyne-care-plan-box__order {
	margin: 4px 0 0;
	font-size: 12px;
	opacity: 0.75;
}

.reshyne-care-plan-box__order a {
	color: inherit;
}

.reshyne-care-plan-box__plan {
	margin: 12px 0 16px;
	padding: 10px 12px;
	border-radius: 6px;
	background: var(--reshyne-care-plan-tint);
	font-size: 13px;
	font-weight: 500;
}

/* Coverage card: green while covered, grey once the term is over. */
.reshyne-care-plan-box__status {
	margin: 12px 0 16px;
	padding: 16px;
	border: 1px solid var(--reshyne-care-plan-covered-border);
	border-radius: 8px;
	background: var(--reshyne-care-plan-covered-bg);
}

.reshyne-care-plan-box__status--ended {
	border-color: var(--reshyne-care-plan-ended-border);
	background: var(--reshyne-care-plan-ended-bg);
}

.reshyne-care-plan-box__status-title {
	display: flex;
	gap: 6px;
	align-items: center;
	margin: 0 0 12px;
	color: var(--reshyne-care-plan-covered-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.reshyne-care-plan-box__status--ended .reshyne-care-plan-box__status-title {
	color: var(--reshyne-care-plan-ended-text);
}

.reshyne-care-plan-box__status-icon {
	flex: none;
	width: 16px;
	height: 16px;
}

/* Two columns of cells, each a small muted label above its value, filled in
   source order: Plan number | Term, then Remaining. One column on very narrow
   screens. */
.reshyne-care-plan-box__facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 16px;
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

.reshyne-care-plan-box__fact {
	min-width: 0;
}

.reshyne-care-plan-box__fact dt {
	margin: 0 0 2px;
	color: var(--reshyne-care-plan-muted);
	font-size: 11px;
	font-weight: 400;
}

.reshyne-care-plan-box__fact dd {
	margin: 0;
	color: var(--reshyne-care-plan-card-text);
	font-size: 13px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

@media (max-width: 359px) {
	.reshyne-care-plan-box__facts {
		grid-template-columns: 1fr;
	}
}

/* The "What's covered" disclosure reuses the product page classes; this only
   tucks it under the plan block and keeps the button's gap below it. */
.reshyne-care-plan-box__coverage {
	margin: -8px 0 16px;
}

/* Pin the button to the bottom so cards of different heights line up. */
.reshyne-care-plan-box a.button.reshyne-care-plan-box__button {
	margin-top: auto;
	border-radius: 10px;
}
