/**
 * PatientVault front-end styles.
 * Patient profile cards shown on WooCommerce My Account → Account Details.
 */

.patientvault-profile {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid #e4e7eb;
}

.patientvault-profile__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.patientvault-profile__heading {
	margin: 0;
	font-size: 1.4rem;
	color: #1f2933;
}

.patientvault-profile__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.patientvault-btn {
	display: inline-block;
	padding: 0.6em 1.2em;
	border-radius: 4px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
}

.patientvault-btn--edit {
	background: #2b6cb0;
	color: #fff;
	border: 1px solid #2b6cb0;
}

.patientvault-btn--edit:hover {
	background: #245a96;
	color: #fff;
}

.patientvault-btn--pdf {
	background: #fff;
	color: #2b6cb0;
	border: 1px solid #2b6cb0;
}

.patientvault-btn--pdf:hover {
	background: #f0f6fc;
	color: #2b6cb0;
}

.patientvault-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

.patientvault-card {
	border: 1px solid #e4e7eb;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	overflow: hidden;
}

.patientvault-profile .patientvault-card__title,
.patientvault-card__title {
	margin: 0;
	padding: 0.9rem 1.25rem;
	font-size: 1.05rem;
	color: #fff !important;
	background: #2b6cb0;
}

.patientvault-card--medical .patientvault-card__title {
	background: #2f855a;
}

.patientvault-card--physician .patientvault-card__title {
	background: #6b46c1;
}

.patientvault-card__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	background: #eef1f5;
}

.patientvault-field {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.85rem 1.25rem;
	background: #fff;
}

.patientvault-field__label {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #7b8794;
}

.patientvault-field__value {
	font-size: 0.98rem;
	color: #1f2933;
	word-break: break-word;
}

/* ---- Completeness progress ---- */
.patientvault-progress {
	margin-bottom: 1.5rem;
}

.patientvault-progress__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.4rem;
	font-size: 0.85rem;
}

.patientvault-progress__label {
	font-weight: 600;
	color: #1f2933;
}

.patientvault-progress__updated {
	color: #7b8794;
}

.patientvault-progress__bar {
	position: relative;
	height: 10px;
	background: #e4e7eb;
	border-radius: 999px;
	overflow: hidden;
}

.patientvault-progress__fill {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #2b6cb0, #2f855a);
	border-radius: 999px;
	transition: width 0.3s ease;
}

.patientvault-empty-note {
	margin: 0 0 1.5rem;
	padding: 0.85rem 1.1rem;
	background: #fff8e1;
	border: 1px solid #f6e2a8;
	border-radius: 6px;
	color: #7a5b00;
	font-size: 0.92rem;
}

/* ---- Inline edit form ---- */
.patientvault-control {
	width: 100%;
	padding: 0.55em 0.7em;
	border: 1px solid #cbd2d9;
	border-radius: 4px;
	font-size: 0.95rem;
	color: #1f2933;
	background: #fff;
}

.patientvault-control:focus {
	outline: none;
	border-color: #2b6cb0;
	box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.15);
}

.patientvault-card__grid--form .patientvault-field--input {
	gap: 0.4rem;
}

.patientvault-field--full {
	grid-column: 1 / -1;
}

.patientvault-input {
	width: 100%;
	padding: 0.55em 0.7em;
	border: 1px solid #cbd2d9;
	border-radius: 4px;
	font-size: 0.95rem;
	color: #1f2933;
	background: #fff;
}

.patientvault-input:focus {
	outline: none;
	border-color: #2b6cb0;
	box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.15);
}

textarea.patientvault-input {
	min-height: 70px;
	resize: vertical;
}

.patientvault-profile__actions--form {
	margin-top: 1.5rem;
}

/* ---- Checkout health-status reminder ---- */
.patientvault-checkout-reminder {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0 0 1.75rem;
	padding: 1rem 1.25rem;
	background: #eef5fb;
	border: 1px solid #cfe2f3;
	border-left: 4px solid #0d2f4f;
	border-radius: 8px;
}

.patientvault-checkout-reminder__icon {
	font-size: 1.6rem;
	line-height: 1;
	color: #0d2f4f;
}

.patientvault-checkout-reminder__body {
	flex: 1 1 240px;
}

.patientvault-checkout-reminder__text {
	margin: 0;
	color: #0d2f4f;
	font-size: 0.97rem;
}

.patientvault-checkout-reminder__confirm {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-top: 0.75rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #0d2f4f;
	cursor: pointer;
}

.patientvault-checkout-reminder__confirm input {
	margin-top: 0.15rem;
}

.patientvault-checkout-reminder__btn {
	display: inline-block;
	padding: 0.65em 1.3em;
	border-radius: 6px;
	background: #2ab673;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.patientvault-checkout-reminder__btn:hover {
	opacity: 0.9;
	color: #fff !important;
}

@media (max-width: 640px) {
	.patientvault-checkout-reminder__btn {
		width: 100%;
		text-align: center;
	}
}

/* ---- Completion confirmation modal ---- */
body.patientvault-modal-open {
	overflow: hidden;
}

.patientvault-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.patientvault-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(13, 47, 79, 0.55);
}

.patientvault-modal__box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	background: #fff;
	border-radius: 12px;
	padding: 2.25rem 2rem 2rem;
	text-align: center;
	box-shadow: 0 20px 50px rgba(13, 47, 79, 0.3);
	animation: patientvault-pop 0.25s ease;
}

@keyframes patientvault-pop {
	from { transform: translateY(12px) scale(0.97); opacity: 0; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}

.patientvault-modal__close {
	position: absolute;
	top: 0.6rem;
	right: 0.9rem;
	border: 0;
	background: none;
	font-size: 1.6rem;
	line-height: 1;
	color: #7b8794;
	cursor: pointer;
}

.patientvault-modal__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: #2ab673;
	color: #fff;
	font-size: 2rem;
	line-height: 64px;
}

.patientvault-modal__title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	color: #0d2f4f;
}

.patientvault-modal__text {
	margin: 0 0 1.5rem;
	color: #52606d;
	font-size: 1rem;
}

.patientvault-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}

.patientvault-modal__btn {
	flex: 1 1 0;
	min-width: 150px;
	display: inline-block;
	padding: 0.8em 1.2em;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	color: #fff !important;
	transition: opacity 0.2s ease;
}

.patientvault-modal__btn:hover {
	opacity: 0.9;
	color: #fff !important;
}

.patientvault-modal__btn--shop {
	background: #2ab673;
}

.patientvault-modal__btn--profile {
	background: #0d2f4f;
}

/* Single OK button (account-created notice). */
.patientvault-modal__btn--ok {
	flex: 0 1 auto;
	min-width: 160px;
	border: 0;
	background: #0d2f4f;
	font-size: 1rem;
	cursor: pointer;
}

/* Single column on mobile. */
@media (max-width: 640px) {
	.patientvault-card__grid {
		grid-template-columns: 1fr;
	}

	.patientvault-profile__head {
		flex-direction: column;
		align-items: flex-start;
	}

	.patientvault-modal__actions {
		flex-direction: column;
	}
}
