/* Modal Styles */
.prescription-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 9999;
}

.prescription-modal-content {
	position: relative;
	background-color: #fff;
	margin: 5vh auto;
	padding: 20px;
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 10px;
}

.close-modal {
	font-size: 24px;
	cursor: pointer;
	color: #666;
}

.close-modal:hover {
	color: #333;
}

/* Steps Progress Bar */
.steps-progress {
	display: flex;
	justify-content: space-between;
	margin-bottom: 30px;
	position: relative;
}

.steps-progress::before {
	content: "";
	position: absolute;
	top: 15px;
	left: 0;
	right: 0;
	height: 2px;
	background: #e5e5e5;
	z-index: 1;
}

.step {
	position: relative;
	z-index: 2;
	text-align: center;
}

.step-number {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #e5e5e5;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 5px;
	color: #666;
	font-weight: bold;
}

.step.active .step-number {
	background: #007cba;
	color: #fff;
}

.step.completed .step-number {
	background: #46b450;
	color: #fff;
}

.step-label {
	font-size: 12px;
	color: #666;
}

/* Option Cards */
.option-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.option-card {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 15px;
	cursor: pointer;
	transition: all 0.3s ease;
}
.lens_coating .option-card {
	padding: 20px 12px 20px 12px !important;
	margin-bottom: 10px !important;
}
.lens_coating p {
	margin-bottom: 5px !important;
}
.lens_coating .option-card-content .price-container {
	display: flex;
	align-items: center;
	gap: 20px;
}
.lens_coating .option-card-content .price-container .info-icon {
	margin-bottom: 0px !important;
}
.lens_coating .option-card-content .price-container .price {
	margin-bottom: 0px !important;
}

.option-card:hover {
	border-color: #007cba;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.option-card.selected {
	border-color: #007cba;
	background-color: #f0f7ff;
}

.option-card-content h5 {
	margin: 0 0 10px 0;
	font-size: 16px;
}

.option-card-content .price {
	color: #007cba;
	font-weight: bold;
	margin: 0;
}

/* Step Content */
.step-content {
	display: none;
	/*    padding: 20px 0;*/
}

.step-content.active {
	display: block;
}

/* Prescription Tabs */
.prescription-tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.tab-btn {
	padding: 10px 20px;
	border: 1px solid #ddd;
	background: #f8f9fa;
	border-radius: 4px;
	cursor: pointer;
}

.tab-btn.active {
	background: #007cba;
	color: #fff;
	border-color: #007cba;
}

/* Modal Footer */
.modal-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e5e5e5;
}

.price-summary {
	font-weight: bold;
}

.total-price {
	color: #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
	.prescription-modal-content {
		width: 95% !important;
		margin: 2vh auto;
		padding: 15px;
	}

	.steps-progress {
		flex-wrap: wrap;
		gap: 10px;
	}
	.steps-progress::before {
		top: 10px;
	}
	.step-number{
		width: 20px;
		height: 20px;
		font-size: 8px;
	}

	.step-label {
		font-size: 8px;
	}

	.option-cards {
		grid-template-columns: 1fr;
	}

	.prescription-table {
		font-size: 14px;
	}

	.prescription-table input {
		width: 60px;
	}

	.modal-footer {
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}
	.modal-btn {
		gap: 5px !important;
	}
	.modal-btns .button {
		padding: 5px 10px !important;
		white-space: nowrap !important;
	}

	.price-summary {
		margin-bottom: 10px;
	}
}

/* Additional Utility Classes */
.button {
	padding: 10px 20px;
	background: #007cba;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.3s ease;
}

.button:hover {
	background: #006ba1;
}

.button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.prescription-modal-trigger {
	margin-bottom: 20px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.prescription-modal-trigger .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Animation Classes */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideIn {
	from {
		transform: translateY(20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.step-content.active {
	animation: fadeIn 0.3s ease-out;
}

.prescription-modal.active {
	display: block;
	animation: fadeIn 0.3s ease-out;
}

.prescription-modal-content {
	animation: slideIn 0.3s ease-out;
}

.prescription-indicator {
	display: inline-block;
	margin-left: 10px;
	padding: 5px 10px;
	background-color: #e7f6ed;
	color: #0f5132;
	border-radius: 4px;
	font-size: 14px;
}

.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

.has-prescription {
	background-color: #28a745 !important;
}

/* Fix for tab buttons */
.tab-btn {
	border: none;
	background: #f8f9fa;
	padding: 10px 20px;
	margin-right: 5px;
	cursor: pointer;
	border-radius: 4px;
}

.tab-btn.active {
	background: #007bff;
	color: white;
}

/* Fix for price display */
.price-summary {
	font-size: 16px;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 4px;
	margin-bottom: 10px;
}

/* Cart and Checkout Prescription Styles */
.prescription-details-cart {
	margin: 10px 0;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 4px;
}

.prescription-details-cart p {
	margin: 5px 0;
}

.prescription-details-cart strong {
	color: #333;
}

.prescription-details-table {
	width: 100%;
	border-collapse: collapse;
	margin: 10px 0;
}

.prescription-details-table td {
	padding: 5px;
	border-bottom: 1px solid #eee;
}

.prescription-details-table td:first-child {
	font-weight: bold;
	width: 120px;
}

/* Order Admin Styles */
.prescription-details-admin {
	padding: 10px;
	background: #f8f9fa;
	border-radius: 4px;
}

.prescription-details-admin table {
	margin: 10px 0;
}

.prescription-details-admin p {
	margin: 5px 0;
}

/* Email Styles */
.woocommerce-table--prescription-details {
	width: 100%;
	margin-bottom: 20px;
}

.woocommerce-table--prescription-details th,
.woocommerce-table--prescription-details td {
	padding: 8px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

/* Add to Cart Button Styles */
.complete-prescription {
	background-color: #7f54b3;
	color: #ffffff;
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: bold;
	transition: all 0.3s ease;
}

.complete-prescription:hover {
	background-color: #6f459b;
}

.complete-prescription.loading {
	opacity: 0.7;
	cursor: wait;
}

.complete-prescription.loading::after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 10px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	border-top-color: transparent;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Success Message */
.prescription-success {
	background-color: #dff0d8;
	color: #3c763d;
	padding: 10px;
	margin: 10px 0;
	border-radius: 4px;
	display: none;
}
/* Modal Styles */
.prescription-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 999999;
}

.prescription-modal-content {
	position: relative;
	background-color: #fff;
	margin: 5vh auto;
	padding: 20px;
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.prescription-modal-trigger {
	margin-bottom: 15px !important;
	display: inline-flex !important;
	align-items: center;
	gap: 5px;
	background-color: #7f54b3 !important;
	color: #ffffff !important;
}

.prescription-modal-trigger:hover {
	background-color: #6f459b !important;
}

.complete-prescription {
	background-color: #7f54b3 !important;
	color: #ffffff !important;
}

.complete-prescription.loading {
	opacity: 0.7;
	cursor: wait;
}

.complete-prescription.loading::after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 10px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	border-top-color: transparent;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Button Group */
.button-group {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

/* Modal Footer */
.modal-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e5e5e5;
}
.modal-btns {
	display: flex;
	gap: 10px !important;
	align-items: center;
}

body.modal-open {
	overflow: hidden;
}

.prescription-modal-trigger {
	padding: 12px 25px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.3s ease;
	border: none;
	margin: 10px 15px 0px 0px;
	cursor: pointer;
	display: inline-block;
	text-decoration: none;
}

.clear-prescription {
	background-color: #e4e4e4 !important;
	color: #333 !important;
	margin-right: auto !important;
}

.clear-prescription:hover {
	background-color: #d4d4d4 !important;
}

/* Animation for reset */
@keyframes resetShake {
	0% {
		transform: rotate(0);
	}
	15% {
		transform: rotate(-5deg);
	}
	30% {
		transform: rotate(5deg);
	}
	45% {
		transform: rotate(-4deg);
	}
	60% {
		transform: rotate(4deg);
	}
	75% {
		transform: rotate(-2deg);
	}
	85% {
		transform: rotate(2deg);
	}
	92% {
		transform: rotate(-1deg);
	}
	100% {
		transform: rotate(0);
	}
}

.resetting {
	animation: resetShake 0.5s ease-in-out;
}
button#openPrescriptionModal {
	margin: 10px 10px 10px 0px !important;
	border-radius: 10px;
}
.option-card-content {
	position: relative;
}
.title-container {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 10px;
	position: relative;
}
.title-container img {
	width: 40px;
	height: 30px;
}

.title-container h5 {
	margin: 0;
	padding-right: 10px;
}

/* **************************************************************
 NEW CSS HERE 
 ************************************************************* */
/* Main layout structure */
.lcs-layout {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.lcs-column-left {
	display: grid;
	gap: 20px;
	grid-auto-rows: min-content;
}

.lcs-column-right {
	display: grid;
	gap: 20px;
	align-content: start;
}

/* Category styling */
.lcs-category {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	transition: all 0.3s ease;
	opacity: 0.75;
}

.lcs-category.lcs-category-selected {
	border-color: #007cba;
	opacity: 1;
}

/* Category header elements */
.lcs-category-header {
	display: flex;
	align-items: flex-start;
	margin-bottom: 15px;
}

.lcs-category-radio {
	margin: 3px 10px 0 0;
	accent-color: #007cba;
	cursor: pointer;
	height: fit-content !important;
}

.lcs-category-title {
	font-size: 16px;
	font-weight: 700;
	color: #333;
	cursor: pointer;
}

.lcs-category-description {
	font-size: 14px;
	color: #666;
	margin: 0 0 10px 28px;
	line-height: 1.4;
}

/* Options styling */
.lcs-options-wrapper {
	margin-top: 15px;
	display: grid;
	gap: 10px;
}
.lcs-options-wrapper .option-card-content {
	display: flex !important;
	justify-content: space-between;
	align-items: center;
}
.lcs-options-wrapper .option-card-content .title-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	position: relative;
	gap: 20px;
}
.lcs-options-wrapper .option-card-content .price-container {
	display: flex;
	align-items: center;
	gap: 20px;
}
.lcs-options-wrapper .option-card-content .price-container .info-icon {
	margin-bottom: 0px !important;
}
.lcs-options-wrapper .option-card-content .price-container .price {
	white-space: nowrap !important;
}
.lcs-options-wrapper .option-card-content .title-container img {
	width: 40px;
	height: 30px;
}
.lcs-option {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 12px 15px;
	display: block;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	background-color: #fff;
}

.lcs-option:hover {
	border-color: #007cba;
	background-color: rgba(0, 124, 186, 0.05);
}

.lcs-option.lcs-option-selected {
	border-color: #007cba;
	background-color: rgba(0, 124, 186, 0.1);
}

.lch {
	display: flex;
	align-items: center;
	gap: 20px;
}
.mirror_coating .opci {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.mirror_coating .opci .title-container {
	display: flex;
	gap: 15px;
	align-items: center;
}
.mirror_coating .option-card {
	margin-bottom: 10px !important;
}

/* Inactive state modifications */
.lcs-category:not(.lcs-category-selected) {
	.lcs-option {
		background-color: #f9f9f9;
		border-color: #e8e8e8;

		&:hover {
			border-color: #d0d0d0;
		}

		.lcs-option-price {
			color: #666;
		}
	}
}
.required {
	color: red;
}
.pd-section {
	font-family: Arial, sans-serif;
	max-width: 400px;
	margin-top: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 60px;
}

.pd-section h4 {
	font-size: 16px;
	margin-bottom: 10px;
}

.optional {
	font-size: 14px;
	color: gray;
}

.single-pd-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.single-pd-row input {
	flex: 1;
	padding: 5px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.help-text {
	font-size: 12px;
	color: gray;
}

.pd-divider {
	text-align: center;
	font-weight: bold;
	margin: 10px 0;
}

.dual-pd-container {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.dual-pd-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 5px;
}

.dual-pd-row input {
	flex: 1;
	padding: 5px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.side-label {
	font-size: 14px;
}

.dual-pd-help {
	font-size: 12px;
	color: gray;
	margin-top: 5px;
}
/* Responsive adjustments */
@media (max-width: 768px) {
	.lcs-layout {
		grid-template-columns: 1fr;
	}

	.lcs-category {
		margin-bottom: 15px;
	}
	.form-control {
		width: 100% !important;
	}
	.lcs-category-title{
		font-size: 14px;
	}
	.title-container h5{
		font-size: 14px;
	}
	.price-container .price{
		font-size: 14px;
	}
	.pd-section{
		flex-direction: column;
		gap: 20px;
	}
	.dual-pd-row{
		flex-direction: column;
	}
	.dual-pd-row input{
		flex: unset;
		width: 100%;
	}
}

/* *********************************************************** Prescription Tooltip CSS ******************************************************** */

/* Base styles for the info container and icon */
.info-container {
	position: relative;
	display: inline-block;
	cursor: help;
}

.info-icon {
	color: #666666;
	font-size: 18px;
}

/* Custom tooltip styling */
.custom-tooltip {
	position: absolute;
	visibility: hidden;
	opacity: 0;
	width: 250px;
	background-color: #3b9ed7;
	color: #fff;
	text-align: center;
	border-radius: 6px;
	padding: 10px;
	z-index: 99999999999999999;
	bottom: 125%;
	left: 0%;
	transform: translateX(-80%);
	transition: opacity 0.3s, visibility 0.3s;
	box-sizing: border-box;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	font-size: 14px;
	line-height: 1.4;
}

/* Position adjustment to ensure visibility */
.info-container:hover .custom-tooltip {
	visibility: visible;
	opacity: 1;
}

/* Add a small triangle pointer */
.custom-tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: #333 transparent transparent transparent;
}

/* Smart positioning for tooltips that might get cut off */
.info-container.top-right .custom-tooltip {
	bottom: auto;
	right: 0;
	left: auto;
	top: -5px;
	transform: translateY(-100%);
}

.info-container.top-left .custom-tooltip {
	bottom: auto;
	right: auto;
	left: 0;
	top: -5px;
	transform: translateY(-100%);
}

.info-container.bottom-right .custom-tooltip {
	top: 125%;
	bottom: auto;
	right: 0;
	left: auto;
}

.info-container.bottom-left .custom-tooltip {
	top: 125%;
	bottom: auto;
	right: auto;
	left: 0;
}

.info-container.bottom .custom-tooltip {
	top: 125%;
	bottom: auto;
}

.info-container.bottom .custom-tooltip::after {
	top: auto;
	bottom: 100%;
	transform: rotate(180deg);
	top: -10px;
}

/* Ensure tooltips appear above modal content */
.modal .info-container .custom-tooltip {
	z-index: 1050;
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
	.custom-tooltip {
		width: 200px;
	}
}

/* Ensure tooltips don't get cut off at edges */
.info-container:hover .custom-tooltip {
	max-width: 100vw;
	max-height: 100vh;
	overflow: auto;
}

/* Fix for tooltips near the window edges */
.info-container:hover .custom-tooltip.adjust-right {
	left: auto;
	right: 0;
	transform: none;
}

.info-container:hover .custom-tooltip.adjust-left {
	left: 0;
	right: auto;
	transform: none;
}

/* JavaScript can add these classes when tooltip is near edges */
.info-container:hover .custom-tooltip.adjust-top {
	bottom: auto;
	top: 100%;
}

/* For tooltips in modal headers or fixed positions */
.fixed-header .info-container .custom-tooltip,
.modal-header .info-container .custom-tooltip {
	bottom: auto;
	top: 100%;
}

/* Note css */
.note-container {
	max-width: 100%;
	width: 100%;
	margin: 20px auto;
}

.safety-note {
	background-color: #f8f9fa;
	border-left: 5px solid #3b9ed7;
	border-radius: 4px;
	padding: 15px 20px;
	position: relative;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.safety-note-content {
	line-height: 1.5;
	color: #333;
}

.safety-note-content strong {
	color: #3b9ed7;
	font-weight: 600;
}

.lens_coating .note-container {
	margin-bottom: 0px !important;
}

/* 8888888888888888888888888 QR Code css  8888888888888888888888888*/
.pd_banner {
	display: flex;
	flex-direction: row;
	width: 100%;
}
.pdcheck-app {
	display: flex;
	flex-direction: column;
	text-align: center;
	clear: both;
	position: relative;
	top: 10px;
}
.pdcheck-app-qr {
	background-color: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 15px;
	margin: 10px 0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	text-align: center;
	width: 200px;
}

.pdcheck-app img {
	margin-bottom: 10px;
	max-width: 130px;
	border-radius: 4px;
}

.pdcheck-app-link-text {
	font-size: 14px;
	font-weight: 500;
	color: #495057;
}
