/* Glucose Test - giao diện bệnh nhân */
.glutest-card {
	max-width: 420px;
	margin: 1.5rem auto;
	padding: 1.5rem;
	border-radius: 16px;
	box-shadow: 0 4px 24px rgba( 0, 0, 0, 0.08 );
	background: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.glutest-card h2 {
	margin: 0 0 0.25rem;
	font-size: 1.3rem;
	color: #0f766e;
}

.glutest-sub {
	margin: 0 0 1rem;
	color: #6b7280;
	font-size: 0.9rem;
}

#glutest-form label {
	display: block;
	margin-bottom: 0.85rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
}

/* Chỉ áp dụng cho ô nhập text/tel/time — không đụng radio. */
#glutest-form input:not([type="radio"]) {
	display: block;
	width: 100%;
	margin-top: 0.3rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 1rem;
	box-sizing: border-box;
}

#glutest-form input:not([type="radio"]):focus {
	outline: none;
	border-color: #14b8a6;
	box-shadow: 0 0 0 3px rgba( 20, 184, 166, 0.15 );
}

.glutest-fieldset {
	margin: 0 0 0.85rem;
	padding: 0;
	border: 0;
}

.glutest-fieldset legend {
	padding: 0;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
}

/* Hai card chọn xếp cạnh nhau, tự xuống dòng nếu màn quá hẹp. */
.glutest-choice {
	display: flex;
	gap: 0.6rem;
}

.glutest-choice__opt {
	flex: 1 1 0;
	margin: 0;
	cursor: pointer;
}

/* Ẩn ô radio gốc nhưng vẫn giữ accessibility. */
.glutest-choice__opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.glutest-choice__box {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	height: 100%;
	padding: 0.85rem 0.7rem;
	border: 2px solid #d1d5db;
	border-radius: 12px;
	background: #fff;
	text-align: center;
	transition: border-color 0.15s, background 0.15s;
	box-sizing: border-box;
}

.glutest-choice__num {
	font-size: 1.05rem;
	font-weight: 700;
	color: #111827;
}

.glutest-choice__desc {
	font-size: 0.78rem;
	line-height: 1.3;
	color: #6b7280;
}

/* Trạng thái được chọn. */
.glutest-choice__opt input:checked + .glutest-choice__box {
	border-color: #14b8a6;
	background: #f0fdfa;
}

.glutest-choice__opt input:checked + .glutest-choice__box .glutest-choice__num {
	color: #0f766e;
}

/* Viền focus cho người dùng bàn phím. */
.glutest-choice__opt input:focus-visible + .glutest-choice__box {
	box-shadow: 0 0 0 3px rgba( 20, 184, 166, 0.25 );
}

.glutest-btn {
	display: block;
	width: 100%;
	padding: 0.85rem;
	margin-top: 0.5rem;
	border: none;
	border-radius: 10px;
	background: #14b8a6;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

.glutest-btn:hover {
	background: #0f9488;
}

.glutest-btn:disabled {
	background: #9ca3af;
	cursor: default;
}

.glutest-btn--ghost {
	margin-top: 0.85rem;
	background: transparent;
	color: #0f766e;
	border: 1px solid #14b8a6;
}

.glutest-btn--ghost:hover {
	background: #f0fdfa;
}

.glutest-schedule {
	list-style: none;
	padding: 0;
	margin: 0.5rem 0 1.25rem;
}

.glutest-schedule li {
	padding: 0.6rem 0.9rem;
	margin-bottom: 0.5rem;
	background: #f0fdfa;
	border-radius: 10px;
	font-size: 0.95rem;
}

.glutest-schedule strong {
	color: #0f766e;
}

.glutest-hint {
	margin-top: 0.6rem;
	font-size: 0.85rem;
	color: #6b7280;
}

.glutest-msg {
	margin-top: 1rem;
	padding: 0.7rem 0.9rem;
	border-radius: 10px;
	font-size: 0.9rem;
}

.glutest-msg--ok {
	background: #ecfdf5;
	color: #065f46;
}

.glutest-msg--error {
	background: #fef2f2;
	color: #991b1b;
}

/* ===== Hướng dẫn ghim trang cho iOS (animation CSS) ===== */
#glutest-ios-guide {
	margin-top: 1rem;
	padding: 1rem;
	background: #f0fdfa;
	border: 1px solid #99f6e4;
	border-radius: 12px;
}

.glutest-ios-guide__lead {
	margin: 0 0 0.75rem;
	font-size: 0.92rem;
	font-weight: 600;
	color: #0f766e;
}

/* Khung điện thoại mô phỏng */
.glutest-ios-anim {
	display: flex;
	justify-content: center;
	margin: 0.5rem 0 1rem;
}

.glutest-ios-phone {
	position: relative;
	width: 180px;
	height: 240px;
	background: #fff;
	border: 4px solid #1f2937;
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.12 );
}

.glutest-ios-screen {
	position: relative;
	height: 200px;
	background: linear-gradient( 160deg, #e0f2fe, #f0fdfa );
}

/* Các bước hiện lần lượt theo vòng lặp 9s (3 bước x 3s) */
.glutest-ios-toast {
	position: absolute;
	left: 12px;
	right: 12px;
	top: 50%;
	transform: translateY( -50% );
	padding: 10px 12px;
	background: #fff;
	border-radius: 10px;
	font-size: 0.8rem;
	font-weight: 600;
	color: #0f766e;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.12 );
	opacity: 0;
	animation: glutest-step 9s infinite;
}

.glutest-ios-toast--share { animation-delay: 0s; }
.glutest-ios-toast--add   { animation-delay: 3s; }
.glutest-ios-toast--open  { animation-delay: 6s; }

@keyframes glutest-step {
	0%   { opacity: 0; transform: translateY( -40% ); }
	6%   { opacity: 1; transform: translateY( -50% ); }
	28%  { opacity: 1; transform: translateY( -50% ); }
	33%  { opacity: 0; transform: translateY( -60% ); }
	100% { opacity: 0; }
}

/* Thanh dưới Safari + nút Chia sẻ nảy */
.glutest-ios-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 36px;
	background: #f3f4f6;
	border-top: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: center;
}

.glutest-ios-share {
	font-size: 1.2rem;
	animation: glutest-bounce 1.4s ease-in-out infinite;
}

@keyframes glutest-bounce {
	0%, 100% { transform: translateY( 0 ); }
	50%      { transform: translateY( -5px ); }
}

.glutest-ios-steps {
	margin: 0;
	padding-left: 1.2rem;
	font-size: 0.88rem;
	line-height: 1.7;
	color: #374151;
}

.glutest-ios-steps strong { color: #0f766e; }

.glutest-ios-ic { font-style: normal; }

/* Tôn trọng người dùng tắt hiệu ứng chuyển động */
@media ( prefers-reduced-motion: reduce ) {
	.glutest-ios-toast,
	.glutest-ios-share { animation: none; }
	.glutest-ios-toast--share { opacity: 1; }
}
