/**
 * Back In Stock Sidebar Styles
 * Integrates with the existing size selection sidebar.
 */

/* ==========================================================================
   Bell Icon and Notify Link for Out-of-Stock Variations
   ========================================================================== */

.size-option.oos-variation {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-direction: row-reverse;
	cursor: pointer;
	opacity: 1;
	pointer-events: auto;
}

/* Notify link container (bell + text) */
.size-option .bis-notify-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: #666;
	transition: color 0.2s ease;
	order: -1;
	margin-inline-end: auto;
	flex-direction: row-reverse;
}

.size-option.oos-variation:hover .bis-notify-link {
	color: #000;
}

/* Bell icon */
.size-option .bis-bell-icon {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Notify text */
.size-option .bis-notify-text {
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.2;
	white-space: nowrap;
}

.size-option .size-option-text {
	flex: 0 0 auto;
}

/* ==========================================================================
   Inline Back In Stock Form (Scenario 3 - SOME OOS)
   ========================================================================== */

.bis-inline-form-wrap {
	direction: rtl;
	padding: 1.5rem 0;
	margin-top: 1rem;
	border-top: 1px solid #e6e6e6;
}

.bis-inline-form-wrap .bis-form-header {
	margin-bottom: 1.5rem;
}

.bis-inline-form-wrap .bis-form-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.75rem;
	color: #212427;
	line-height: 1.25;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	flex-direction: row-reverse;
}

/* Bell icon in inline form title */
.bis-inline-form-wrap .bis-form-title::before {
	content: "";
	display: inline-block;
	width: 1em;
    height: 1.25em;
	flex-shrink: 0;
	background-image: url("../images/icons/notification-bell.svg");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.bis-inline-form-wrap .bis-form-subtitle {
	font-size: 0.875rem;
	color: #666;
	margin: 0;
	line-height: 1.5;
}

/* Selected size info */
.bis-inline-form-wrap .bis-selected-size {
	font-size: 0.875rem;
	color: #212427;
	margin: 0.75rem 0 0;
	line-height: 1.4;
}

.bis-inline-form-wrap .bis-selected-size strong {
	font-weight: 600;
}

.bis-inline-form-wrap .bis-back-to-sizes {
	color: #212427;
	text-decoration: underline;
	margin-right: 0.5rem;
	font-size: 0.75rem;
}

.bis-inline-form-wrap .bis-back-to-sizes:hover {
	text-decoration: none;
}

/* ==========================================================================
   Back In Stock Form Panel
   ========================================================================== */

.bis-form-panel-wrap {
	position: fixed;
	top: 0;
	right: 0;
	width: 620px;
	max-width: 90vw;
	height: 100%;
	transition: transform 0.4s ease, visibility 0.4s ease;
	visibility: hidden;
	transform: translateX(calc(100% + 2rem));
	z-index: 1000;
	padding: var(--wp--preset--spacing--space-3-rem, 1.5rem) var(--wp--preset--spacing--space-4-rem, 2rem);
	padding-top: 1rem;
	overflow-y: auto;
	background: #fff;
	display: flex;
	flex-direction: column;
}

/* Header with back and close buttons */
.bis-form-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e6e6e6;
}

.bis-back-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: none;
	border: none;
	padding: 0.5rem 0;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	color: #212427;
	font-family: inherit;
	transition: opacity 0.2s ease;
}

.bis-back-btn:hover {
	opacity: 0.7;
}

.bis-back-btn .chevron-left {
	width: 7px;
	height: 12px;
}

.bis-close-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
	color: #666;
	transition: color 0.2s ease;
}

.bis-close-btn:hover {
	color: #212427;
}

.bis-close-btn svg {
	width: 16px;
	height: 16px;
}

.size-sidebar-content.show-bis-panel .bis-form-panel-wrap {
	visibility: visible;
	transform: translateX(0);
}

.size-sidebar-content.show-bis-panel .size-guide-main-wrap {
	transform: translateX(calc(-100% - 2rem));
}

.admin-bar .bis-form-panel-wrap {
	top: 12px;
}

/* ==========================================================================
   Form Wrapper
   ========================================================================== */

.bis-sidebar-form-wrapper {
	direction: rtl;
}

.bis-form-header {
	margin-bottom: 1.5rem;
}

.bis-form-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
	color: #212427;
	line-height: 1.25;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	flex-direction: row-reverse;
}

/* Bell icon in sidebar form title */
.bis-form-panel-wrap .bis-form-title::before {
	content: "";
	display: inline-block;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	background-image: url("../images/icons/notification-bell.svg");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.bis-form-subtitle {
	font-size: 0.875rem;
    color: #212427;
    margin: 0.75rem 0 0;
    line-height: 1.5;
}

/* Selected size info in sidebar form panel */
.bis-form-panel-wrap .bis-selected-size {
	font-size: 0.875rem;
	color: #212427;
	margin: 0.75rem 0 0;
	line-height: 1.4;
}

.bis-form-panel-wrap .bis-selected-size strong {
	font-weight: 600;
}

.bis-form-panel-wrap .bis-back-to-sizes-sidebar {
	color: #212427;
	text-decoration: underline;
	margin-right: 0.5rem;
	font-size: 0.75rem;
}

.bis-form-panel-wrap .bis-back-to-sizes-sidebar:hover {
	text-decoration: none;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.bis-form-panel-wrap form.bis-sidebar-form {
    padding: 0;
    margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.bis-form-field {
	width: 100%;
	margin-bottom: 1.875rem;
}

.bis-form-panel-wrap form.bis-sidebar-form .bis-form-field.bis-phone-field, 
.bis-form-panel-wrap form.bis-sidebar-form .cwg_iagree_checkbox {
    margin-bottom: 1.5rem;
}

.bis-form-panel-wrap form.bis-sidebar-form .cwg_iagree_checkbox label {
	padding-right: 28px;
    display: block;
}

.bis-form-panel-wrap form.bis-sidebar-form .cwg_iagree_checkbox label p:has(a) {
    display: inline;
}

.bis-form-panel-wrap form.bis-sidebar-form .cwg_iagree_checkbox label::before {
    width: 16px;
    height: 16px;
    min-width: auto;
    top: 50%;
    transform: translateY(-50%);
}

.bis-form-panel-wrap form.bis-sidebar-form .cwg_iagree_checkbox label:has(input[type="checkbox"]:checked)::after {
    top: 50%;
    transform: translateY(-65%) rotate(45deg);
    right: 5px;
}

/* Underline style inputs - matching simple product popup */
.bis-form-panel-wrap input.bis-input {
	width: 100%;
	padding: 0 0 0.5rem;
    font-size: 0.75rem;
    margin: 0 !important;
	border: none;
	border-bottom: 1px solid #7A7A7A;
	border-radius: 0;
	font-family: inherit;
	font-weight: 400;
	line-height: 1.5;
	color: #212427;
	transition: border-color 0.2s ease;
	background: transparent;
	text-align: right;
}

.bis-form-panel-wrap input.bis-input:focus {
	outline: none;
	border-bottom-color: #212427;
}

.bis-form-panel-wrap input.bis-input::placeholder {
	color: #212427;
	opacity: 1;
	font-size: 0.75rem;
}

/* Phone field with international input */
.bis-form-panel-wrap .bis-phone-field .iti {
	width: 100%;
}

.bis-form-panel-wrap .bis-phone-field .iti .iti__tel-input {
	width: 100%;
	padding: 1rem 0;
	padding-right: 52px;
	border: none;
	border-bottom: 1px solid #7A7A7A;
	border-radius: 0;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.5;
	color: #212427;
	background: transparent;
	text-align: right;
	margin-bottom: 1rem;
}

.bis-form-panel-wrap .bis-phone-field .iti .iti__tel-input:focus {
	outline: none;
	border-bottom-color: #212427;
}

.bis-form-panel-wrap .bis-phone-field .iti .iti__tel-input::placeholder {
	color: #212427;
	opacity: 1;
	font-size: 0.75rem;
}

/* Hide country dropdown in sidebar */
.bis-form-panel-wrap .bis-phone-field .iti__country-container {
	display: none;
}

/* ==========================================================================
   Privacy Checkbox (from plugin) - Sidebar Form Panel
   ========================================================================== */

.bis-form-panel-wrap .cwg_iagree_checkbox {
	margin-bottom: 1.5rem;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	justify-content: flex-end;
}

.bis-form-panel-wrap .cwg_iagree_checkbox label {
	margin: 0;
	padding-right: 30px;
	position: relative;
	text-align: right;
	font-weight: 400;
	font-size: 0.75rem;
	line-height: 1.33;
	color: #212427;
	width: 100%;
	display: flex;
	align-items: center;
	cursor: pointer;
}

.bis-form-panel-wrap .cwg_iagree_checkbox label::before {
	content: "";
	width: 20px;
	height: 20px;
	min-width: 20px;
	position: absolute;
	top: 0;
	right: 0;
	background: #fff;
	border: 1px solid #212427;
	box-sizing: border-box;
}

.bis-form-panel-wrap .cwg_iagree_checkbox label:has(input[type="checkbox"]:checked)::before {
	background: #212427;
}

.bis-form-panel-wrap .cwg_iagree_checkbox label:has(input[type="checkbox"]:checked)::after {
	content: "";
	position: absolute;
	right: 7px;
	top: 3px;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.bis-form-panel-wrap .cwg_iagree_checkbox label input[type="checkbox"] {
	position: absolute;
	top: 0;
	right: 0;
	width: 20px;
	height: 20px;
	opacity: 0;
	cursor: pointer;
}

.bis-form-panel-wrap .cwg_iagree_checkbox label p {
	margin: 0;
}

.bis-form-panel-wrap .cwg_iagree_checkbox label a {
	color: #212427;
	text-decoration: underline;
}

/* ==========================================================================
   Submit Button - Sidebar Form Panel
   ========================================================================== */

.bis-form-panel-wrap form.bis-sidebar-form .bis-form-submit {
	margin-top: 0;
}

.bis-form-panel-wrap .bis-submit-btn {
	width: 100%;
	min-height: 40px;
	height: auto;
	padding: 7px 12px;
	background: #212427 !important;
	color: #fff !important;
	border: 1px solid #212427;
	font-family: inherit;
	font-size: 1rem !important;
	font-weight: 400;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    letter-spacing: 0;
}

.bis-form-panel-wrap .bis-submit-btn:hover {
	background: #fff !important;
	color: #212427 !important;
}

.bis-form-panel-wrap .bis-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ==========================================================================
   Form Output / Messages
   ========================================================================== */

.bis-form-output {
	margin-top: 1rem;
}

.bis-form-output:empty {
	display: none;
}

.bis-form-output .cwginstocksuccess {
	padding: 1rem;
	background: #d4edda;
	color: #155724;
	border-radius: 4px;
	font-size: 0.875rem;
}

.bis-form-output .cwginstockerror {
	padding: 1rem;
	background: #f8d7da;
	color: #721c24;
	border-radius: 4px;
	font-size: 0.875rem;
}

/* ==========================================================================
   Notify Me Button (for ALL out of stock scenario)
   ========================================================================== */

.bis-notify-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 1rem 1.5rem;
	background: #fff;
	color: #000;
	border: 1px solid #000;
	font-size: 0.875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	min-height: 3.5rem;
}

.bis-notify-btn:hover {
	background: #000;
	color: #fff;
}

/* Change add to cart text when all variations out of stock */
.woocommerce div.product form.cart.all-oos .single_add_to_cart_button::before {
    content: "הירשמי לעדכון מלאי";
}

.woocommerce div.product form.cart.all-oos .single_add_to_cart_button span {
    display: none !important;
}

/* ==========================================================================
   Back Button (in form panel)
   ========================================================================== */

.size-sidebar-content.show-bis-panel button.back-to-main-pannel {
	display: flex;
}

.size-sidebar-content.show-bis-panel h3.h3,
.size-sidebar-content.show-bis-panel .h3 {
	display: none;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.bis-form-panel.is-loading {
	position: relative;
}

.bis-form-panel.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ==========================================================================
   Sidebar Form Panel Loader - Use Pandora's GIF
   ========================================================================== */

/* Loader inside the sidebar form panel (during form submission) */
.bis-form-panel-wrap .blockOverlay {
	display: block !important;
	position: absolute;
	inset: 0;
	z-index: 999999999;
	background: rgba(255, 255, 255, 0.8) url('../images/loading-gif.gif') no-repeat center center !important;
	background-size: 50px auto !important;
}

/* Hide the WooCommerce default ::before loader inside sidebar panel */
.bis-form-panel-wrap .blockOverlay::before {
	display: none !important;
	content: none !important;
}

/* Hide other blockUI elements in sidebar */
.bis-form-panel-wrap .blockMsg,
.bis-form-panel-wrap .blockPage,
.bis-form-panel-wrap .blockElement,
.bis-form-panel-wrap .blockUI:not(.blockOverlay) {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	background: none !important;
}

/* Position the form for proper overlay */
.bis-form-panel-wrap .bis-sidebar-form-wrapper {
	position: relative;
}

/* Custom loading overlay for sidebar form */
.bis-loading-overlay {
	position: absolute;
	inset: 0;
	z-index: 999999;
	background: rgba(255, 255, 255, 0.8) url('../images/loading-gif.gif') no-repeat center center;
	background-size: 50px auto;
}

/* ==========================================================================
   RTL Adjustments
   ========================================================================== */

.rtl .size-option.oos-variation {
	flex-direction: row;
}

.rtl .size-option .bis-bell-icon {
	margin-inline-end: auto;
	margin-inline-start: 0;
}

.rtl .bis-input {
	text-align: right;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
	.bis-form-panel-wrap {
		width: 100%;
		max-width: 100%;
	}

	.bis-form-title {
		font-size: 1rem;
	}

	.bis-form-subtitle {
		font-size: 0.8125rem;
	}
}

/* ==========================================================================
   SweetAlert2 Popup Styling (Slide-in from right like side-popup-link)
   For Simple Products - using the plugin's native popup
   ========================================================================== */

/* Prevent body scroll when popup is open */
body.swal2-shown {
	overflow: hidden !important;
	padding-inline-start: var(--scrollbarW);
}

body.swal2-shown header.wp-block-template-part.wp-header--fixed {
	inset-inline-start: var(--scrollbarW);
}

/* Container base styles */
body.single-product .swal2-container {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity ease 0.3s, visibility ease 0.3s;
}

body.single-product .swal2-container.swal2-backdrop-show,
body.single-product .swal2-container.swal2-noanimation {
	background: rgba(0, 0, 0, 0.5);
}

body.single-product .swal2-container.swal2-backdrop-show {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Popup styles - Slides from RIGHT like side-popup-link */
body.single-product .swal2-container .swal2-popup {
	margin: 0 !important;
	position: absolute;
	top: 0;
	right: 0;
	left: auto;
	bottom: auto;
	width: 620px;
	max-width: 90vw;
	height: 100%;
	padding: 0;
	border-radius: 0;
	background: #fff;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
    padding-top: 2.1875rem;
	overflow-y: auto;
	overflow-x: hidden;
	animation: none;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform ease 0.3s, visibility ease 0.3s;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

body.single-product .swal2-container .swal2-popup.swal2-show {
	visibility: visible;
	transform: translateX(0);
}

/* Scrollbar styling */
body.single-product .swal2-container .swal2-popup::-webkit-scrollbar {
	width: 5px;
}

body.single-product .swal2-container .swal2-popup::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.05);
}

body.single-product .swal2-container .swal2-popup::-webkit-scrollbar-thumb {
	background: #000;
}

/* Header styling */
body.single-product .swal2-container .swal2-header {
	margin: 0;
}

/* Close button - positioned on the left side (RTL) */
body.single-product .swal2-container .swal2-close {
	position: absolute;
	width: 30px;
	height: 30px;
	top: 1.25rem;
	left: auto;
    right: var(--wp--preset--spacing--space-4-rem, 2rem);
    font-size: 0;
	color: #666;
	background: none;
	border: none;
	border-radius: 4px;
	z-index: 10;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: all 0.3s ease;
}

body.single-product .swal2-container .swal2-close:hover {
	background: #fff;
	color: #333;
}

body.single-product .swal2-container .swal2-close::before {
    content: "";
    background-color: #666;
    -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.1925 19.8996L0.100586 0.807693L0.807693 0.100586L19.8996 19.1925L19.1925 19.8996Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0.100586 19.1925L19.1925 0.100586L19.8996 0.807693L0.807693 19.8996L0.100586 19.1925Z"></path></svg>');
	mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.1925 19.8996L0.100586 0.807693L0.807693 0.100586L19.8996 19.1925L19.1925 19.8996Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0.100586 19.1925L19.1925 0.100586L19.8996 0.807693L0.807693 19.8996L0.100586 19.1925Z"></path></svg>');
    -webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
    -webkit-mask-position: center;
	mask-position: center;
    -webkit-mask-size: 100%;
	mask-size: 100%;
    width: 16px;
    height: 16px;
}

body.single-product .swal2-container .swal2-close:hover::before {
	background-color: #333;
}

/* Content area */
body.single-product .swal2-container .swal2-content,
body.single-product .swal2-container .swal2-html-container {
	padding: 0;
	margin: 0;
}

/* Form panel styling */
body.single-product .swal2-container .cwginstock-subscribe-form .panel {
	border: none;
	border-radius: 0;
	margin: 0;
	box-shadow: none;
}

body.single-product .swal2-container .cwginstock-subscribe-form .panel-heading {
	background: none !important;
	border: none !important;
	border-bottom: none !important;
	color: #000 !important;
	padding: 2.5rem var(--wp--preset--spacing--space-6-rem, 3rem) 1.5rem;
	text-align: right;
	border-radius: 0;
	margin-bottom: 0;
	direction: rtl;
}

/* Title with bell icon - inline layout */
body.single-product .swal2-container .cwginstock-subscribe-form .panel-heading h4 {
	color: #212427 !important;
	text-align: right !important;
	font-weight: 600 !important;
	font-size: 1rem !important;
	line-height: 1.25 !important;
	margin: 0 0 0.75rem 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 0.5rem !important;
	flex-direction: row-reverse !important;
	position: relative;
}

/* Bell icon via ::before on h4 */
body.single-product .swal2-container .cwginstock-subscribe-form .panel-heading h4::before {
	content: "";
	display: inline-block;
	width: 1em;
    height: 1.25em;
	flex-shrink: 0;
	background-image: url("../images/icons/notification-bell.svg");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	position: absolute;
	left: 0;
}

/* Subtitle after title */
body.single-product .swal2-container .cwginstock-subscribe-form .panel-heading::after {
	content: "הזינו את פרטיכם ואנו נעדכן אתכם ברגע שהתכשיט יחזור למלאי!";
	display: block;
	font-size: 0.875rem;
	font-weight: 400;
	color: #212427;
	text-align: right;
	line-height: 1.43;
}

body.single-product .swal2-container .cwginstock-subscribe-form .panel-body {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem var(--wp--preset--spacing--space-6-rem, 3rem) 3rem;
	direction: rtl;
}

body.single-product .swal2-container .cwginstock-subscribe-form .row {
	margin: 0;
}

body.single-product .swal2-container .cwginstock-subscribe-form .col-md-12 {
	padding: 0;
	float: none;
}

body.single-product .swal2-container .cwginstock-subscribe-form .form-group {
	margin: 1.5rem 0 0 !important;
}

/* Form inputs - Underline style (bottom border only) */
body.single-product .swal2-container .cwginstock-subscribe-form .form-group input {
	margin-bottom: 1.5rem !important;
    height: auto;
    padding: 0 0 0.5rem !important;
    border: none !important;
    border-bottom: 1px solid #7A7A7A !important;
    border-radius: 0 !important;
    text-align: right !important;
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #212427;
    width: 100%;
    box-sizing: border-box;
    background: transparent !important;
}

body.single-product .swal2-container .cwginstock-subscribe-form .form-group input:focus {
	border-bottom-color: #212427 !important;
	outline: none;
}

body.single-product .swal2-container .cwginstock-subscribe-form .form-group input::placeholder {
	color: #212427;
	opacity: 1;
	font-size: 0.75rem;
}

/* Phone input with intl-tel-input */
body.single-product .swal2-container .cwginstock-subscribe-form .iti .iti__tel-input:focus {
	border-bottom-color: #212427 !important;
	outline: none;
}

body.single-product .swal2-container .cwginstock-subscribe-form .iti__country-container {
	display: none !important;
}

body.single-product .swal2-container .cwginstock-subscribe-form .iti__selected-country {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
}

/* Submit button */
body.single-product .swal2-container .cwginstock-subscribe-form .form-group input.cwgstock_button {
	margin: 0;
	margin-top: 1rem;
	text-align: center !important;
	min-height: 40px;
	height: 40px;
	background: #212427 !important;
	border: 1px solid #212427 !important;
	border-bottom: 1px solid #212427 !important;
	padding: 7px 12px !important;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	font-weight: 400;
	font-size: 1rem !important;
	line-height: 1.3;
	color: #fff !important;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	border-radius: 0 !important;
}

body.single-product .swal2-container .cwginstock-subscribe-form .form-group input.cwgstock_button:not(.disabled):not(:disabled):hover {
	background: #fff !important;
	border: 1px solid #212427 !important;
	border-bottom: 1px solid #212427 !important;
	color: #212427 !important;
}

/* Privacy checkbox - RTL layout with checkbox on the right */
body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox {
	margin-bottom: 1.5rem;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	justify-content: flex-end;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox label {
	margin: 0;
	padding-right: 28px;
    display: block;
	position: relative;
	text-align: right;
	font-weight: 400;
	font-size: 0.75rem;
	line-height: 1.33;
	color: #212427;
	width: 100%;
	/* display: flex;
	align-items: center; */
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox label::before {
	content: "";
	width: 16px;
    height: 16px;
    min-width: auto;
    top: 50%;
    transform: translateY(-50%);
	position: absolute;
	right: 0;
	background: #fff;
	border: 1px solid #212427;
	box-sizing: border-box;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox label:has(input[type="checkbox"]:checked)::before {
	background: #212427;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox label:has(input[type="checkbox"]:checked)::after {
	content: "";
	position: absolute;
	top: 50%;
    right: 5px;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
    transform: translateY(-65%) rotate(45deg);
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox label input[type="checkbox"] {
	position: absolute;
	top: 0;
	right: 0;
	width: 20px;
	height: 20px;
	opacity: 0;
	cursor: pointer;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox label p {
	margin: 0;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox label p:has(a) {
    display: inline;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwg_iagree_checkbox label a {
	color: #212427;
	text-decoration: underline;
}

/* Error/Success messages */
body.single-product .swal2-container .cwginstock-subscribe-form .cwginstockerror {
	margin-top: 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.3;
	color: #dc3545;
	padding: 0.75rem;
	background: #f8d7da;
	border-radius: 4px;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwginstock-success-message-wrapper {
	text-align: center;
	padding: 2rem 1.5rem;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwginstock-success-message-wrapper .success-title {
	position: relative;
	margin-bottom: 1rem;
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.3;
	color: #000;
}

body.single-product .swal2-container .cwginstock-subscribe-form .cwginstock-success-message-wrapper .success-message {
	margin: 0 auto;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #000;
	max-width: 320px;
}

/* ==========================================================================
   Loader Styling - Use Pandora's GIF
   ========================================================================== */

/* Initial blockUI loader (before popup opens) - full page overlay */
body.single-product > .blockUI.blockOverlay {
	background: rgba(255, 255, 255, 0.9) url('../images/loading-gif.gif') no-repeat center center !important;
	background-size: 50px auto !important;
	cursor: wait !important;
	opacity: 1 !important;
}

/* Hide the WooCommerce default ::before loader (SVG spinner) */
body.single-product > .blockUI.blockOverlay::before {
	display: none !important;
	content: none !important;
}

/* Hide ALL other blockUI elements (message, page block, etc.) - only show overlay */
body.single-product > .blockUI.blockMsg,
body.single-product > .blockUI.blockPage,
body.single-product > .blockUI.blockElement,
body.single-product > .blockUI:not(.blockOverlay) {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	background: none !important;
}

/* Also hide any child loader images inside blockUI */
body.single-product > .blockUI img,
body.single-product > .blockUI .blockMsg img {
	display: none !important;
}

/* Loader inside the popup (during form submission) */
body.single-product .swal2-container:has(.blockOverlay) .cwginstock-subscribe-form {
	position: static !important;
}

body.single-product .swal2-container:has(.blockOverlay) .swal2-content,
body.single-product .swal2-container:has(.blockOverlay) .swal2-html-container {
	z-index: 9;
}

body.single-product .swal2-container .blockOverlay {
	display: block !important;
	position: absolute;
	inset: 0;
	z-index: 999999999;
	background: rgba(255, 255, 255, 0.8) url('../images/loading-gif.gif') no-repeat center center !important;
	background-size: 50px auto !important;
}

/* Hide the WooCommerce default ::before loader inside popup (SVG spinner) */
body.single-product .swal2-container .blockOverlay::before {
	display: none !important;
	content: none !important;
}

/* Style the plugin's popup submit button */
body.single-product .cwg_popup_submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 1rem 1.5rem;
	background: #fff;
	color: #000;
	border: 1px solid #000;
	font-size: 0.875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	min-height: 3.5rem;
	font-family: inherit;
}

body.single-product .cwg_popup_submit:hover {
	background: #000;
	color: #fff;
}

/* ==========================================================================
   Admin Bar Adjustment
   ========================================================================== */

body.admin-bar.single-product .swal2-container .swal2-popup {
	top: 32px;
	height: calc(100% - 32px);
}

.cwginstock-subscribe-form {
	padding: 2rem var(--wp--preset--spacing--space-4-rem, 2rem);
}

@media (max-width: 782px) {
	body.admin-bar.single-product .swal2-container .swal2-popup {
		top: 46px;
		height: calc(100% - 46px);
	}
}
