/* Flex Shipping Popup Styles */
.bosta-flex-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	display: none;
}

.bosta-flex-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	z-index: 10000;
	min-width: 400px;
	display: none;
}

.bosta-flex-popup h3 {
	margin: 0 0 20px 0;
	color: #333;
	font-size: 18px;
}

.bosta-flex-popup-description {
	margin: 0 0 20px 0;
	padding: 12px 16px;
	background: #e7f3ff;
	border: 1px solid #b3d9ff;
	border-radius: 4px;
	color: #0066cc;
	font-size: 14px;
	line-height: 1.4;
	position: relative;
}

.bosta-flex-popup-description::before {
	content: "ℹ";
	font-weight: bold;
	margin-right: 8px;
	font-style: normal;
}

.bosta-flex-popup-note {
	margin: 0 0 20px 0;
	color: #666;
	font-size: 12px;
	line-height: 1.3;
	font-style: italic;
}

.bosta-flex-popup-error {
	margin: 2px 0 16px 0;
	color: #e53e3e;
	font-size: 12px;
}

.bosta-flex-popup input[type="text"] {
	width: 100%;
	padding: 10px 10px 10px 45px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.3s, box-shadow 0.3s;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.bosta-flex-popup input[type="text"]:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.bosta-flex-popup input[type="text"].error {
	border-color: #e53e3e;
	box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

.bosta-flex-popup label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #555;
}

.bosta-flex-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 10px;
}

.bosta-flex-input-prefix {
	position: absolute;
	left: 10px;
	color: #666;
	font-size: 14px;
	font-weight: 500;
	z-index: 1;
	pointer-events: none;
}

.bosta-flex-popup-buttons {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.bosta-flex-popup-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: background-color 0.3s, transform 0.2s;
}

.bosta-flex-popup-btn.cancel {
	background: #f1f1f1;
	color: #666;
}

.bosta-flex-popup-btn.cancel:hover {
	background: #e1e1e1;
	transform: translateY(-1px);
}

.bosta-flex-popup-btn.cancel:active {
	background: #d1d1d1;
	transform: translateY(0);
}

.bosta-flex-popup-btn.next {
	background: #0073aa;
	color: white;
}

.bosta-flex-popup-btn.next:hover {
	background: #005a87;
	transform: translateY(-1px);
}

.bosta-flex-popup-btn.next:active {
	background: #004d73;
	transform: translateY(0);
}

.bosta-flex-popup-btn.next:focus {
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3);
}
/* End of Flex Shipping Popup Styles */

/* Start of Flex Shipping checkbox field styles */
.bosta-disabled-field {
	position: relative;
}

.bosta-disabled-field input[type="checkbox"] {
	pointer-events: none;
}

.bosta-disabled-field .hint-tooltip {
	position: absolute;
	background: #0073aa;
	color: white;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
	top: -40px;
	left: 50%;
	transform: translateX(-50%);
}

.bosta-disabled-field .hint-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: #0073aa transparent transparent transparent;
}

.bosta-disabled-field:hover .hint-tooltip {
	opacity: 1;
	visibility: visible;
}

/* End of Flex Shipping checkbox field styles */

/* Start of Flex Shipping terms & conditions popup styles */
.bosta-flex-terms-content {
	background: #f8fafd;
	border: 1px solid #e0e6ed;
	border-radius: 4px;
	padding: 16px 18px;
	margin-bottom: 20px;
	color: #222;
	font-size: 14px;
	line-height: 1.6;
	max-height: 300px;
	overflow-y: auto;
}

.bosta-flex-terms-content ol {
	margin: 12px 0 12px 20px;
	padding: 0 0 0 18px;
}

.bosta-flex-terms-content li {
	margin-bottom: 10px;
}

.bosta-flex-terms-content li:last-child {
	margin-bottom: 0;
}

.bosta-flex-terms-confirm {
	margin-top: 16px;
	font-weight: 600;
	color: #222;
	font-size: 13px;
}

.bosta-flex-popup-alert {
	display: inline-block;
	margin-left: 12px;
	padding: 2px 10px;
	background: #fff4e5;
	color: #d35400;
	border: 1px solid #ffd9b3;
	border-radius: 12px;
	font-size: 12px;
	vertical-align: middle;
	box-shadow: 0 1px 2px rgba(213, 84, 0, 0.04);
	letter-spacing: 0.02em;
} 
/* End of Flex Shipping terms & conditions popup styles */

/* Hide FlexShippingValue hidden field completely */
tr:has(input[name="woocommerce_bosta_FlexShippingValue"]) {
    display: none !important;
}

/* Start of Responsive styles */
@media (max-width: 500px) {
    .bosta-flex-popup {
        min-width: unset;
        width: 95vw;
        padding: 12px;
    }
    .bosta-flex-terms-content {
        padding: 10px 6px;
        font-size: 13px;
        max-height: 40vh;
    }
}
/* End of Responsive styles */