/* familia-glasses – legacy lens chooser (full-screen dialog `ey`) in the old shop's colours (client decision 2026-09-23). */
.fg { width: 100%; margin: 0 0 12px; }
.fg [hidden], .single_add_to_cart_button[hidden] { display: none !important; }
/* The prescription form outside the chooser too (order page, My account → Receptai): a hidden PD variant / message stays hidden. */
.fg-rx-form [hidden], .familia-rx-form [hidden] { display: none !important; }
.fg-open, .familia .fg button.fg-open { width: 100%; min-height: 64px; font-size: 16px; font-weight: 500; text-transform: none; box-shadow: 0 10px 30px 4px rgb(0 0 0 / .15); }   /* legacy order button h-16 */
/* The order goes through "Pasirinkti lęšius" → "Toliau"; WooCommerce's own button only submits. */
form.cart:has(.fg[data-config]) .single_add_to_cart_button { display: none !important; }
.fg-open:disabled { opacity: .5; cursor: not-allowed; }

.fg-dialog, .fg-rx-dialog, .fg-rx-pick,
.fg-dialog *, .fg-rx-dialog *, .fg-rx-pick * { box-sizing: border-box; }
.fg-dialog {
	width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 20px 16px 120px;
	border: 0; background: #fff; color: var(--f-ink, #140e06); overflow-y: auto;
}
.fg-dialog::backdrop { background: rgb(61 41 29 / .5); }
.fg-layout { display: flex; flex-direction: column; gap: 20px; max-width: 1228px; margin: 0 auto; min-height: 100%; }
.fg-product__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fg-product__title { font-size: 18px; font-weight: 400; }
.fg-product__promo { display: none; margin: 0 0 4px; font-size: 18px; }
.fg-product__image img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.fg-dialog button.fg-back, .fg-dialog button.fg-close {
	display: inline-flex; align-items: center; gap: 12px; padding: 8px; margin: -8px;
	border: 0; background: transparent; color: #6d625b; font-size: 18px; font-weight: 500; cursor: pointer;
}
.fg-dialog button.fg-close { font-size: 30px; font-weight: 300; line-height: 1; color: var(--f-ink, #140e06); }
.fg-dialog button.fg-back { color: var(--f-default-900, #666); }   /* legacy "Grįžti atgal": grey, sentence case */
.fg-nav { display: none; }
.fg-progress { height: 4px; border-radius: 999px; background: #f1f4f9; overflow: hidden; }
.fg-progress span { display: block; height: 100%; width: 0; border-radius: 999px; background: #8dc9f7; transition: width .25s ease; }
.fg-step { padding-bottom: 12px; }
.fg-step__title { margin: 24px 0 24px; font-size: 26px; font-weight: 400; line-height: 1.2; }
.fg-options, .fg-rx-choice { display: grid; gap: 12px; }
.fg-option, .fg-rx-option {
	display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
	padding: 20px; border: 2px solid #e8eaed; border-radius: 4px; background: #fff; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}
.fg-option:hover, .fg-rx-option:hover { background: #f6f6f6; }
.fg-option:focus-visible, .fg-rx-option:focus-visible { outline: 2px solid #6293b4; outline-offset: 2px; }
.fg-option.is-selected, .fg-rx-option.is-selected { border-color: var(--f-ink, #140e06); background: #f6f6f6; }
.fg-option__text { display: grid; gap: 10px; min-width: 0; }
.fg-option__title, .fg-rx-option__title { font-size: 18px; font-weight: 400; }
.fg-option__desc { font-size: 14px; line-height: 1.55; color: #140e06; }
.fg-option__desc p, .fg-option__desc div { margin: 0; }
.fg-option__price { text-align: right; white-space: nowrap; font-size: 18px; }
.fg-option__old { text-decoration: line-through; text-decoration-thickness: 2px; }
.fg-option__now { font-weight: 500; color: #6293b4; }
.fg-option__now--sale { font-weight: 500; color: var(--f-ink, #140e06); }
.fg-rx-option { flex-direction: column; gap: 6px; }
/* legacy phone option: the title in a grey box on the left, the price on the
   right, the description under both – no framed card (desktop keeps the card) */
@media (max-width: 767px) {
	.fg-option {
		display: grid; grid-template-columns: minmax(0, auto) auto; grid-template-areas: "title price" "desc desc";
		justify-content: space-between; align-items: center; gap: 16px 12px; padding: 0 0 24px; border: 0; background: transparent;
	}
	.fg-option:hover { background: transparent; }
	.fg-option__text { display: contents; }
	.fg-option__title { grid-area: title; justify-self: start; padding: 12px 20px; border: 2px solid transparent; border-radius: 4px; background: var(--f-default-100, #f6f6f6); font-weight: 400; }
	.fg-option__desc { grid-area: desc; }
	.fg-option__price { grid-area: price; }
	.fg-option.is-selected { background: transparent; }
	.fg-option.is-selected .fg-option__title { border-color: var(--f-ink, #140e06); }
}
.fg-rx-option__desc { font-weight: 300; }
.fg-rx-option--static { cursor: default; }
.fg-rx-option--static:hover { background: #fff; }
/* Receptai options (legacy `ey`): icon column 100px + text, 2px frame; the chosen one gets an ink frame around the
   card and, when a prescription is given, its summary under it. */
.fg-rx-option { flex-direction: row; align-items: center; gap: 0; padding: 28px 28px 28px 0; }
.fg-rx-option__icon { flex: 0 0 100px; display: flex; justify-content: center; color: var(--f-ink, #140e06); }
.fg-rx-option__text { display: grid; gap: 6px; min-width: 0; }
.fg-rx-option--existing .fg-rx-option__title, .fg-rx-option--new .fg-rx-option__title { font-size: 17px; font-weight: 400; }
.fg-rx-choice__item { border: 2px solid transparent; border-radius: 4px; }
.fg-rx-choice__item.is-selected { border-color: var(--f-ink, #140e06); }
.fg-rx-choice__item.is-selected .fg-rx-option { border-color: var(--f-default-100, #f6f6f6); background: #fff; }
.fg-rx-summary { display: grid; gap: 8px; padding: 20px 30px; background: #f6f6f6; font-size: 15px; }
.fg-rx-summary__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; }
.fg-rx-summary__eye { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px; background: #fff; }
.fg-rx-summary__eye strong { flex-basis: 100%; }
.fg-dialog .fg-rx-edit, .fg-dialog .fg-summary__rx-edit { justify-self: start; padding: 0; border: 0; background: none; color: var(--f-ink, #140e06); font-size: 15px; font-weight: 400; text-decoration: underline; cursor: pointer; }
.fg-summary__rx-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fg-summary__rx-head .fg-summary__title { margin-bottom: 32px; }
.fg-error, .fg-rx-error { margin: 12px 0 0; color: #c62828; font-size: 14px; }
.fg-error:empty, .fg-rx-error:empty { display: none; }
.fg-confirm, .fg-next { width: 100%; min-height: 56px; margin-top: 20px; font-weight: 500; text-transform: none; }
.fg-next:disabled { opacity: .5; cursor: not-allowed; }

.fg-summary { display: grid; gap: 4px; }
.fg-summary__order, .fg-summary__rx { padding: 32px 16px; background: #f6f6f6; }
.fg-summary__order { border-top-right-radius: 100px; }
.fg-summary__title { margin: 0 0 32px; font-size: 26px; font-weight: 400; }
.fg-summary__list { display: grid; gap: 28px; margin: 0; }
.fg-summary__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.fg-summary__row dt { display: grid; gap: 6px; min-width: 0; margin: 0; }
.fg-summary__label { font-weight: 500; text-transform: none; }
.fg-summary__row dd { margin: 0; font-size: 18px; font-weight: 500; color: #6293b4; white-space: nowrap; }
.fg-summary .fg-next { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; border-radius: 0; box-shadow: 0 -8px 24px rgb(61 41 29 / .08); }

@media (min-width: 768px) {
	.fg-dialog { padding: 40px 32px; }
	.fg-layout { flex-direction: row; gap: 80px; align-items: flex-start; }
	.fg-product { flex: 1 1 auto; min-width: 0; position: sticky; top: 0; }
	.fg-dialog .fg-product__head button.fg-back, .fg-dialog .fg-product__head button.fg-close { display: none; }
	.fg-product__title { font-size: 32px; font-weight: 400; }
	.fg-product__promo { display: block; }
	.fg-product__image img { max-height: 434px; }
	.fg-main { flex: 0 0 495px; max-width: 495px; display: grid; gap: 48px; }
	.fg-nav { display: flex; justify-content: space-between; align-items: center; }
	.fg-step__title { margin-top: 0; font-weight: 400; }
	.fg-option, .fg-rx-option { padding: 28px; }
	.fg-summary__order, .fg-summary__rx { padding: 48px 40px; border-radius: 0; }
	.fg-summary .fg-next { position: static; margin-top: 20px; border-radius: 4px; box-shadow: none; }
}

/* prescription entry + saved prescriptions */
.fg-rx-dialog, .fg-rx-pick {
	width: min(760px, calc(100vw - 24px)); max-height: 92dvh; padding: 28px; border: 0; border-radius: 8px;
	background: #fff; color: var(--f-ink, #140e06); overflow-y: auto;
}
.fg-rx-dialog::backdrop, .fg-rx-pick::backdrop { background: rgb(61 41 29 / .5); }
.fg-rx-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.fg-rx-dialog__head h3 { margin: 0; font-size: 24px; font-weight: 400; }
.fg-rx-dialog__close { padding: 4px 8px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--f-ink, #140e06); }
.fg-rx-form { display: grid; gap: 24px; }
.fg-rx-date { display: grid; gap: 6px; max-width: 260px; font-size: 14px; }
.fg-rx-grid { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); gap: 8px 16px; align-items: center; }
.fg-rx-head { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-transform: none; font-size: 13px; }
.fg-rx-eye { font-size: 17px; min-width: 100px; }
.fg-rx-cell__label { display: none; }
.fg-rx-form select { width: 100%; min-height: 44px; }
.fg-rx-form select:disabled { opacity: .5; }
.fg-tip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; font-weight: 500; text-transform: none; cursor: help; }
.fg-rx-pd { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.fg-rx-pd .fg-rx-head { flex-basis: 100%; }
.fg-rx-pd label { display: grid; gap: 6px; min-width: 160px; font-size: 14px; }
.fg-rx-form .fg-pd-toggle { padding: 0; border: 0; background: none; color: var(--f-ink, #140e06); text-decoration: underline; cursor: pointer; }
.fg-rx-save { width: 100%; min-height: 56px; margin-top: 20px; font-weight: 500; text-transform: none; }
.fg-rx-choice .fg-rx-option, .fg-summary__rx .fg-rx-option { justify-content: flex-start; padding: 28px 28px 28px 0; text-align: left; }
/* the order review's "Pridėti receptą": the same choices, compact (60px icon column, 14px rows), 8px apart */
.fg-summary__rx-body { display: grid; gap: 8px; }
.fg-summary__rx .fg-rx-option { padding: 14px 16px 14px 0; }
.fg-summary__rx .fg-rx-option__icon { flex-basis: 60px; }
.fg-summary__rx .fg-rx-option__title,
.fg-summary__rx .fg-rx-option--existing .fg-rx-option__title,
.fg-summary__rx .fg-rx-option--new .fg-rx-option__title { font-size: 15px; }
.fg-summary__rx .fg-rx-option__desc { font-size: 13px; }
/* Plain links / icon buttons, not the theme's sky buttons (`.familia button`): the dialog cross, "Turiu dvi PD reikšmes"
   (legacy link variant: small, bold, red) and "Redaguoti". */
.familia .fg button.fg-rx-dialog__close, .familia .fg-rx-form button.fg-pd-toggle, .familia .fg button.fg-rx-edit, .familia .fg button.fg-summary__rx-edit {
	display: inline-block; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none;
	color: var(--f-ink, #140e06); font-weight: 400; text-transform: none; text-decoration: none;
}
.familia .fg button.fg-rx-dialog__close { padding: 4px 8px; font-size: 28px; font-weight: 300; line-height: 1; }
.familia .fg-rx-form button.fg-pd-toggle { align-self: center; color: var(--f-red, #ff0000); font-size: 13px; font-weight: 500; }
.familia .fg button.fg-rx-edit, .familia .fg button.fg-summary__rx-edit { font-size: 15px; text-decoration: underline; }
.familia .fg button.fg-rx-dialog__close:hover, .familia .fg-rx-form button.fg-pd-toggle:hover, .familia .fg button.fg-rx-edit:hover, .familia .fg button.fg-summary__rx-edit:hover { background: none; }
/* legacy: "Privalomas laukas" under the field (red, 12px), the field framed */
.fg-rx-grid { align-items: start; }
.fg-rx-grid > .fg-rx-eye { align-self: center; }
.fg-rx-req { display: block; margin-top: 4px; color: var(--f-red, #ff0000); font-size: 12px; font-weight: 400; text-transform: none; }
.fg-rx-form .is-invalid select { border-color: #c7319c; box-shadow: 0 0 0 1px #c7319c; }
.fg-rx-pd label { align-self: start; }
/* saved prescriptions (legacy `zg`): one card per prescription with a radio, "Pasirinkite" under the list */
.fg-rx-pick__list { display: grid; gap: 20px; }
.fg-rx-pick__item { display: grid; gap: 16px; padding: 20px; border: 2px solid var(--f-default-100, #f6f6f6); border-radius: 4px; background: var(--f-default-50, #fff); cursor: pointer; }
.fg-rx-pick__item.is-selected { border-color: var(--f-ink, #140e06); background: var(--f-default-100, #f6f6f6); }
.fg-rx-pick__head { display: flex; align-items: center; gap: 12px; }
.fg-rx-pick__head input { width: 20px; height: 20px; margin: 0; accent-color: var(--f-ink, #140e06); }
.fg-rx-pick__type { font-size: 20px; font-weight: 500; }
.fg-rx-pick__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 15px; }
.fg-rx-pick__date { color: var(--f-default-900, #666); font-weight: 500; }
.fg-rx-pick__eyes { display: grid; gap: 8px; }
.fg-rx-pick__eye { display: grid; gap: 4px; padding: 10px 16px; background: var(--f-default-100, #f6f6f6); font-size: 15px; }
.fg-rx-pick__item.is-selected .fg-rx-pick__eye { background: var(--f-default-50, #fff); }
.fg-rx-pick__eye-label { font-weight: 500; }
.fg-rx-pick__empty { margin: 32px 0; text-align: center; font-size: 20px; font-weight: 500; }
.fg-rx-pick__use { width: 100%; min-height: 56px; margin-top: 20px; font-weight: 500; text-transform: none; }
.fg-rx-pick__use:disabled { opacity: .5; cursor: not-allowed; }
@media (min-width: 1024px) { .fg-rx-pick__eyes { grid-template-columns: 1fr 1fr; } }
/* My account → Receptai modal is narrower than the chooser's form: tighter selects so "-12.75" stays readable */
body.familia.woocommerce-account .familia-rx-form--legacy .fg-rx-grid select { padding-left: 8px; padding-right: 24px; background-position: right 6px center; background-size: 14px; font-size: 16px; }
.familia-rx-type { display: grid; gap: 6px; }
/* prescription rows under the frame on the order page */
.fg-item-rx { margin-top: 8px; }
@media (max-width: 640px) {
	.fg-rx-dialog, .fg-rx-pick { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; padding: 20px 16px; }
	.fg-rx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fg-rx-grid > span:first-child, .fg-rx-grid > .fg-rx-head { display: none; }
	.fg-rx-eye { grid-column: 1 / -1; margin-top: 8px; font-size: 18px; }
	.fg-rx-cell { display: grid; gap: 6px; }
	.fg-rx-cell__label { display: block; font-weight: 500; text-transform: none; font-size: 12px; }
}

/* order page: prescription sent later */
.fg-order-rx { background: #f6f6f6; padding: 24px; border-radius: 10px; }
.fg-order-rx p { font-size: 13px; }
.fg-order-rx .fg-rx-form { margin-bottom: 20px; }

/* admin order item */
.familia-admin-rx table { max-width: 520px; margin-top: 6px; }

/* the line above "Toliau" while it is not active yet (glasses.js renderSummary) */
.fg-next-hint { margin: 0 0 8px; color: var(--f-red, #f00); font-size: 14px; line-height: 1.4; text-align: center; }
.fg-next-hint[hidden] { display: none; }
