@import '../../includes/method-conditions/assets/css/lwc-conditions';

/*--------- Instance settings -----------*/
.lwbs-title-text-wrap {
	margin-right: 300px;
	min-width: 763px;

	@media only screen and (max-width: 850px) {
		width: 100%;
		margin-right: 0;
		min-width: 0;
	}
}
.lwbs-title-text {
	padding: 3px 8px;
	font-size: 1.7em;
	line-height: 100%;
	height: 1.7em;
	width: 100%;
	outline: none;
	margin: 0 0 3px;
	background-color: #fff;
}

.lwbs-shipping-method-wrap {

	@media only screen and (max-width: 850px) {
		width: 100%;
		margin-right: 0;
	}
}

/* ------------ Shipping Settings ------------- */
.lwbs_shipping_settings {
	float: none;
	line-height: 19px;
}

.lwbs-option label {
	display: inline-block;
	width: 150px;
}

/* ----------- Condition validation ------------ */

.lwc-condition.condition-error,
.lwc-operator.condition-error {
	border-color: #dc3545;
}

.lwc-condition.condition-warning,
.lwc-operator.condition-warning {
	border-color: #ffa500;
}

/* Help tab */
#contextual-help-back {
	right: 250px;
}

.contextual-help-sidebar {
	width: 220px;
}

/* ------------- Notice ----------------- */
.livemesh-shipping-notice {
	position: relative;

	.lwbs-notice-dismiss {
		color: #72777c;
	}
}

/* -------------- Table Rates styling ---------- */

.lwbs-table-rates-settings {
	overflow: hidden;
	border: 1px solid #eee;

	.inside {
		padding: 0;
		margin: 0 !important;
		// 			background: #f1f1f1;
		display: block;
		position: relative;
	}

	.lwbs-table-rates-sections {
		float: left;
		box-sizing: border-box;
		padding: 10px 10px 10px 20px;
		background: #fff;

		.lwbs-table-rates-section {
			margin: 50px 0;

			&:first-child {
				margin-top: 0;
			}

			&:last-child {
				margin-bottom: 20px;
			}

			.lwbs-table-rate-option {
				border-bottom: 1px solid #eee;
				padding: 0 0 15px 0;
			}

			.lwbs-input-group-list {
				display: flex;
				flex-wrap: wrap;
				gap: 15px;
				clear: both;

				.lwbs-input-group-inline {
					padding: 0 5px 0 0;
				}

				.lwbs-input-group {
					flex-basis: 0;
					flex-grow: 1;
					max-width: 100%;
					width: 100%;

					&.lwbs-input-group-per-value, &.lwbs-input-group-threshold-value {
						max-width: 100px;
					}

					&.lwbs-input-group-min-value, &.lwbs-input-group-max-value {
						max-width: 130px;
					}
				}
			}
		}

		.repeater-header {
			font-weight: bold;
		}

		.repeater-row {
			padding: 5px 0;

			&:first-child .delete-repeater-row {
				visibility: hidden;
			}

			.delete-repeater-row {
				cursor: pointer;
			}

			.lwbs-input-group {
				display: flex;
				align-items: center;
			}
		}

		.add-repeat-row {
			margin-top: 5px;
		}

		input[type="text"], input[type="password"], input[type="checkbox"], select, textarea {
			max-width: 100%;
			width: 100%;
			height: 28px;
			line-height: 28px;
			z-index: 1;
		}

		.select2-container .select2-selection--single,
		.select2-container .select2-selection--single .select2-selection__rendered,
		.select2-container .select2-selection--single .select2-selection__arrow {
			height: 28px;
			line-height: 28px;
		}

		img.help_tip {
			margin: 0;
		}

		.lwbs-input-addon {
			padding: 0 8px;
			border: 1px solid #8c8f94;
			height: 28px;
			line-height: 28px;
			background: #eee;
			max-width: 14px;
		}

		.lwbs-input-addon-left {
			border-right: none;
			margin-right: -2px;
			border-radius: 4px 0 0 4px;

			& + input {
				border-left: none;
				border-top-left-radius: 0;
				border-bottom-left-radius: 0;
			}
		}

		.lwbs-input-addon-right {
			order: 2;
			border-left: none;
			margin-left: -2px;
			border-radius: 0 4px 4px 0;

			& + input {
				border-right: none;
				border-top-right-radius: 0;
				border-bottom-right-radius: 0;
			}
		}
	}
}

.lwbs-table-rates-settings #rate_per_product .repeater-header .lwbs-input-group:first-child,
.lwbs-table-rates-settings #rate_per_product .repeater-row .lwbs-input-group:first-child,
.lwbs-table-rates-settings #rate_per_shipping_class .repeater-header .lwbs-input-group:first-child,
.lwbs-table-rates-settings #rate_per_shipping_class .repeater-row .lwbs-input-group:first-child,
.lwbs-table-rates-settings #rate_per_category .repeater-header .lwbs-input-group:first-child,
.lwbs-table-rates-settings #rate_per_category .repeater-row .lwbs-input-group:first-child {
	flex-grow: 1.5;
}

/* ------------  Select2 ---------------- */

.lwbs-table-rates-settings-wrap {

	.select2-container {
		margin: 1px;

		&.select2-container-active .select2-choice {
			border: 1px solid #666;
		}

		&.select2-drop-above .select2-choice {
			border-radius: 0 0 4px 4px;
			border: 1px solid #666;
			border-top-color: rgba(0, 0, 0, 0);
		}

		.select2-choice {
			border-color: #ddd;
			-webkit-border-radius: 5px;
			-moz-border-radius: 5px;
			border-radius: 5px;
			height: 26px;
			-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
			box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
		}
	}

	.select2-dropdown-open .select2-choice {
		border-bottom-color: rgba(0, 0, 0, 0);
		-webkit-box-shadow: 0 1px 0 #fff inset;
		box-shadow: 0 1px 0 #fff inset;
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		border: 1px solid #666;
		outline: 0;
	}

}

.select2-container .select2-search__field {
	min-width: 75px !important;
}

.lwbs-upgrade-notice {
	padding: 20px;
	margin: 20px 0 0;
	max-width: 600px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-left-width: 4px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	h3 {
		margin: 0 0 10px 0;
	}
	p {
		font-size: 15px;
		line-height: 1.6
	}
	a {
		font-size: 15px;
		line-height: 1;
		font-weight: bold;
	}
}