/* ==========================================================================
   Product Page Toggle Box Card (Matches Site Accordion Attribute Selector Style)
   ========================================================================== */

.pst-sleep-trial-wrapper {
	margin: 10px 0 16px 0;
	width: 100%;
	clear: both;
}

.pst-toggle-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 12px 16px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	position: relative;
	cursor: pointer;
}

.pst-toggle-card:hover {
	border-color: #94a3b8;
}

.pst-toggle-card.is-active {
	border-color: #00b050 !important;
	background-color: #ffffff;
}

.pst-toggle-left {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 1;
	min-width: 0;
	padding-right: 12px;
}

.pst-toggle-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
}

.pst-toggle-icon svg {
	display: block;
	width: 24px;
	height: 24px;
}

.pst-toggle-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pst-title-line {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.pst-main-label {
	font-size: 15px;
	font-weight: 500;
	color: #1e293b;
	line-height: 1.3;
	font-family: inherit;
}

.pst-toggle-subtext {
	margin: 0;
	padding: 0;
	font-size: 12px;
	color: #64748b;
	line-height: 1.45;
	font-family: inherit;
}

.pst-addon-price {
	font-size: 12px;
	font-weight: 600;
	color: #00873d;
	background: #eafaf1;
	padding: 2px 8px;
	border-radius: 4px;
	border: 1px solid #c2eed5;
	display: inline-block;
	transition: all 0.2s ease;
}

.pst-addon-price:empty {
	display: none;
}

.pst-toggle-right {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

/* ==========================================================================
   iOS Style Toggle Switch
   ========================================================================== */

.pst-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	cursor: pointer;
	margin: 0;
}

.pst-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.pst-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #e2e8f0;
	transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 24px;
}

.pst-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #ffffff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 50%;
}

.pst-switch input:checked + .pst-slider {
	background-color: #00b050;
}

.pst-switch input:checked + .pst-slider:before {
	transform: translateX(20px);
}

/* Focus styles for accessibility */
.pst-toggle-input:focus-visible + .pst-slider {
	outline: 2px solid #00b050;
	outline-offset: 2px;
}

/* ==========================================================================
   Popup Modal Dialog
   ========================================================================== */

.pst-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 99999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pst-modal-backdrop.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto !important;
	display: flex !important;
}

.pst-modal-container {
	max-width: 530px;
	width: 100%;
	margin: auto;
	box-sizing: border-box;
	pointer-events: auto !important;
	position: relative;
	z-index: 10;
}

.pst-modal-dialog {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
	position: relative;
	padding: 38px 34px 34px 34px;
	box-sizing: border-box;
	transform: scale(0.94) translateY(10px);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	max-height: 90vh;
	overflow-y: auto;
	pointer-events: auto !important;
	z-index: 20;
}

.pst-modal-backdrop.is-open .pst-modal-dialog {
	transform: scale(1) translateY(0);
}

/* Close Button (X) */
.pst-modal-close {
	position: absolute;
	top: 18px;
	right: 18px;
	background: transparent;
	border: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	padding: 0;
	z-index: 10;
}

.pst-modal-close:hover {
	background-color: #f1f5f9;
	color: #1e293b;
}

/* Modal Content Layout */
.pst-modal-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.pst-modal-header-icon {
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pst-modal-heading-wrap {
	margin-bottom: 14px;
}

.pst-modal-title {
	margin: 0;
	padding: 0;
	font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	line-height: 1.25;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.pst-title-prefix {
	font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 24px;
	font-weight: 700;
	color: #1e293b;
	letter-spacing: -0.3px;
}

.pst-title-highlight {
	font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 26px;
	font-weight: 700;
	color: #b89358;
	letter-spacing: -0.3px;
}

.pst-modal-description {
	margin-bottom: 22px;
	padding: 0 4px;
}

.pst-modal-description p {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #475569;
	font-family: inherit;
}

/* Choices Radio Cards */
.pst-modal-choices {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 18px;
}

.pst-choice-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background-color: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	transition: all 0.2s ease;
	position: relative;
	box-sizing: border-box;
}

.pst-choice-card:hover {
	border-color: #cbd5e1;
	background-color: #fafbfc;
}

.pst-choice-card.is-selected {
	border-color: #b89358;
	background-color: #fffdf9;
	box-shadow: 0 0 0 1px #b89358;
}

.pst-choice-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
}

/* Custom Checkbox Appearance */
.pst-checkbox-box {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border: 2px solid #cbd5e1;
	border-radius: 5px;
	background-color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.pst-choice-card.is-selected .pst-checkbox-box {
	border-color: #b89358;
	background-color: #b89358;
}

.pst-check-icon {
	display: none;
}

.pst-choice-card.is-selected .pst-check-icon {
	display: block;
}

.pst-choice-text-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
}

.pst-choice-label {
	font-size: 13.5px;
	font-weight: 500;
	color: #1e293b;
	line-height: 1.35;
}

.pst-choice-price {
	font-size: 12.5px;
	font-weight: 600;
	color: #b89358;
}

/* Terms Notice */
.pst-modal-terms-notice {
	font-size: 11.5px;
	color: #64748b;
	line-height: 1.4;
	margin-bottom: 20px;
}

.pst-modal-terms-notice a {
	color: #1e293b;
	text-decoration: underline;
	transition: color 0.2s ease;
}

.pst-modal-terms-notice a:hover {
	color: #b89358;
}

/* Action Buttons */
.pst-modal-actions {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.pst-btn-continue {
	width: 100%;
	background-color: #1e2b37;
	color: #ffffff !important;
	border: none;
	border-radius: 8px;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
	font-family: inherit;
	box-sizing: border-box;
	display: inline-block;
	text-align: center;
	line-height: 1.2;
}

.pst-btn-continue:hover {
	background-color: #0f172a;
}

.pst-btn-continue:active {
	transform: scale(0.99);
}

.pst-btn-dismiss {
	background: none;
	border: none;
	padding: 6px 12px;
	color: #475569;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: underline;
	transition: color 0.2s ease;
	font-family: inherit;
}

.pst-btn-dismiss:hover {
	color: #0f172a;
}

/* ==========================================================================
   Cart Item Badges
   ========================================================================== */

.pst-cart-badge {
	display: inline-block;
	background-color: #fff9ed;
	color: #926f34;
	border: 1px solid #f2e3c6;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	margin-top: 4px;
}

.pst-cart-badge.pst-protector-badge {
	background-color: #f0fdf4;
	color: #166534;
	border-color: #bbf7d0;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 600px) {
	.pst-toggle-card {
		padding: 12px 14px;
	}

	.pst-toggle-title {
		font-size: 13.5px;
	}

	.pst-toggle-subtext {
		font-size: 11.5px;
	}

	.pst-modal-dialog {
		padding: 28px 20px 24px 20px;
		border-radius: 12px;
	}

	.pst-title-prefix {
		font-size: 20px;
	}

	.pst-title-highlight {
		font-size: 22px;
	}

	.pst-modal-description p {
		font-size: 12px;
	}

	.pst-choice-label {
		font-size: 12.5px;
	}

	.pst-btn-continue {
		padding: 13px 16px;
		font-size: 14px;
	}
}
