@use "../admin/assets/styles/data-table/index.scss" as *;
@use "../frontend/index.scss" as *;
@use "sidebar";

.settings_page_unadorned-announcement-bar #wpcontent {
	padding-left: 0 !important;
}

:root {
	--ac-bubble-user-color: #e1facf;
}

.awsm-wc {
	&-loading-wrapper {
		align-items: center;
		justify-content: center;
		min-height: 100%;
		display: flex;
	}
	&-tab {
		&-header {
			display: flex;

			align-items: stretch;
			flex-direction: column;
			gap: calc(8px);
			-webkit-box-pack: center;

			padding: 26px 32px 0;
			position: sticky;
			background-color: #fff;
			top: 32px;
			z-index: 2;
			border-bottom: 1px solid #ddd;
			height: 95px;
			justify-content: flex-start;
			box-sizing: border-box;
			h2 {
				margin: 0;
			}
			p {
				margin: 0;
			}
		}
		&-content {
			// margin: 0 -30px;
			// display: flex;
			min-height: 100%;
			display: flex;
			flex-direction: column;
			&-in {
				flex: 1;
			}
			&-edit {
				max-width: 390px;
				margin: 57px auto 100px auto;
			}
			&-body {
				padding: 0 30px;
				&-in {
					max-width: 830px;
					margin-left: auto;
					margin-right: auto;
				}
			}
			&-chat-form {
				.awsm-wc-tab-content-in {
					background-color: #f7f6f6;
				}
			}
		}
		&-editor-header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding-right: 16px;
			border-bottom: 1px solid #ddd;
			&-left {
				display: flex;
				align-items: center;
				gap: 5px;
			}
			&-right {
				display: flex;
				align-items: center;
				gap: 10px;
			}
		}
	}
	&-chatform-title {
		margin-bottom: 20px;
		.components-text-control__input[type="text"] {
			font-size: 24px;
			box-shadow: none;
			border: none;
			background-color: transparent;
			&::placeholder {
				color: rgba(#1e1e1e, 0.3);
			}
		}
	}
	&-chat-form-builder {
		&-field-type {
			color: rgba(#1e1e1e, 0.4);
			font-size: 11px;
			margin-bottom: 4px;
		}
		.form-builder-item {
			margin-bottom: 20px;
		}
		.form-builder-footer {
			.components-button {
				border: 1px solid #dddddd;
				background-color: #fff;
				height: 46px;
			}
		}
		.components-button:focus {
			box-shadow: none;
		}
		.components-panel {
			border: none;
			border-radius: 12px;
			background-color: #fff;
			box-shadow: 0px 1px 3px 0 rgba(0, 0, 0, 0.15);
			// overflow: hidden;
			&__row {
				border-top: 1px solid #dedede;
				padding-top: 18px;
			}
			&__body {
				border: none;
				.form-builder-drag-handle {
					left: -36px;
				}
				&.is-opened {
					> .components-panel__body-title {
						margin-bottom: 0;
					}
				}
				&-title {
					&:hover {
						background: transparent;
					}
				}
				&-toggle {
					&.components-button {
						padding-left: 16px !important;
						font-weight: 400;
						[dir="rtl"] & {
							text-align: right;
						}
					}
				}
			}
		}

		&-item-chat {
			display: flex;
			.awsm-wc-chat-item {
				margin-left: auto;
				margin-top: 14px;
				margin-right: 0;
			}
		}
	}
	&-tab-disabled {
		pointer-events: none;
		.awsm-wc-tab-tile {
			opacity: 0.3;
		}
	}
	&-tab-tile {
		display: flex;
		align-items: center;
		svg {
			margin-right: 8px;
		}
	}
	&-mobile-nav-item {
		display: flex;
		flex-direction: row;
		&-upgrade {
			.awsm-wc-mobile-nav-item,
			svg {
				color: #0fa400;
			}
		}
	}
	&-mobile-nav-content {
		> div {
			display: block;
		}
		.components-card__body {
			padding: 0;
		}
	}
	&-disabled {
		pointer-events: none;
	}
	.tab-disabled {
		opacity: 0.3;
	}
	&-has-sidebar {
		display: flex;
		padding: 0;
		flex: 1;
		@media screen and (max-width: 782px) {
			display: block;
		}
	}
	&-btn-editor-back.components-button.is-link {
		align-items: center;
		align-self: stretch;
		background: #1e1e1e;
		border: none;
		border-radius: 0;
		color: #fff;
		display: flex;
		height: 60px;
		position: relative;
		width: 60px;
	}
	&-widget-title {
		.components-text-control__input {
			font-size: 25px;
			border: none;
			height: auto;
			&::placeholder {
				color: rgba(#1e1e1e, 0.3);
			}
		}
	}
	&-add-widget {
		background: #f5f5f7;
		padding: 16px;
		margin-top: 38px;
		margin-bottom: 38px;
		padding: 32px 28px;
		border-radius: 8px;
		h2 {
			margin: 0 0 6px 0;
		}
		p {
			margin: 0;
		}
	}
	&-widget-item {
		border-radius: 8px;
		border: 1px solid #ddd;
		padding-top: 18px;
		padding-bottom: 18px;
		&:hover {
			border: 1px solid #3858e9;
		}
	}
	&-dashboard {
		background-color: #fff;
		color: #1e1e1e;

		.components-snackbar-list {
			bottom: 10px;
			position: fixed;
			right: 10px;
			z-index: 1000;
		}

		.components-snackbar-list .components-snackbar {
			margin-left: auto;
		}

		&__header {
			position: sticky;
			left: 0;
			top: 32px;
			z-index: 2;
			padding: 4px 13px 0 26px;
			height: 60px;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: space-between;
			background: #fff;
			width: 220px;
			border-right: 1px solid #ddd;
			@media screen and (max-width: 782px) {
				top: 0;
				padding-left: 24px;
				width: 100%;
				border-right: 0;
				border-bottom: 1px solid #ddd;
			}
		}
		&__tabs {
			display: grid;
			grid-template-columns: 220px auto;
			> .wc-components-tab-panel__tabs {
				padding: 20px 12px;
				border-right: 1px solid #ddd;
				align-self: flex-start;
				position: sticky;
				top: 92px;
				min-height: calc(100svh - 92px);
				box-sizing: border-box;
				display: flex;
				flex-direction: column;
				> .wc-components-tab-panel__tabs-item {
					background: #0000;
					border: none;
					border-radius: 0;
					box-shadow: none;
					cursor: pointer;
					font-weight: 500;
					height: 48px;
					margin-left: 0;
					padding: 3px 16px;
					position: relative;

					display: flex;
					align-items: center;
					gap: 8px;
					padding: 8px 16px;
					border-radius: 2px;
					font-weight: 400;
					height: auto;
					font-size: 13px;
					// &:last-child {
					// 	color: #0fa400;
					// }
				}
				.wc-components-tab-panel__tabs-item.is-active {
					background: #f0f0f0;
					box-shadow: none;
					font-weight: 500;
					&:after {
						display: none;
					}
				}
			}
			> .wc-components-tab-panel__tab-content {
				margin-top: -60px;
			}
		}
	}
	&-template-modal {
		.components-modal__header {
			border: 1px solid #ddd;
			padding: 33px 48px;
			@media screen and (max-width: 782px) {
				padding: 30px;
			}
		}
		.components-modal__content {
			padding: 30px 48px 54px 48px;
			@media screen and (max-width: 782px) {
				padding: 30px;
			}
		}
	}
	&-table {
		width: 100%;
		text-indent: 0;
		border-color: inherit;
		border-collapse: collapse;
		position: relative;
		color: #757575;
		margin-bottom: auto;
		th {
			text-align: left;
			color: #1e1e1e;
			font-weight: normal;
			font-size: 13px;
		}
		th,
		td {
			padding: 12px;
			white-space: nowrap;
		}
		tr {
			border-top: 1px solid #f0f0f0;
		}
		thead {
			position: sticky;
			inset-block-start: 0;
			z-index: 1;
			tr {
				border: 0;
			}
			th {
				background-color: #fff;
				padding-top: 8px;
				padding-bottom: 8px;
				padding-left: 12px;
				font-size: 11px;
				text-transform: uppercase;
				font-weight: 500;
			}
		}
		tr:last-child {
			border-bottom: 0;
		}
		.awsm-wc-table-header-button {
			padding: 4px 8px;
			font-size: 11px;
			text-transform: uppercase;
			font-weight: 500;
		}

		&__cell-content-wrapper {
			min-height: 32px;
			display: flex;
			align-items: center;
			white-space: normal;
		}
		.components-button.is-compact {
			height: 32px;
		}
		.components-button.is-compact.has-icon:not(.has-text) {
			padding: 0;
			width: 32px;
			min-width: 32px;
		}
	}
	&-pro {
		&-badge {
			font-size: 12px;
			padding: 2px 4px;
			background-color: #1e1e1e;
			color: #fff;
			border-radius: 4px;
		}
		&-banner {
			padding: 16px 4px;
			display: flex;
			align-items: center;
			justify-content: center;
			background-color: #e8f4e1;
			border-radius: 8px;
			&-content {
				font-size: 13px;
				color: #1e1e1e;
				margin-left: 13px;
				a {
					font-weight: bold;
					color: #1e1e1e;
					text-decoration: underline;
				}
			}
		}
	}
	&-dataview-link {
		cursor: pointer;
	}
	&-upgrade-card {
		padding: 30px 30px 43px 30px;
		background-color: #f5f5f7;
		border-radius: 8px;
		margin-top: 40px;
		@media screen and (min-width: 992px) {
			display: flex;
		}
		&-content {
			flex: 1;
			h2 {
				margin-bottom: 6px;
				font-weight: bold;
				font-size: 16px;
				margin-top: 0;
			}
			p {
				color: #777777;
				font-size: 13px;
				margin-bottom: 15px;
				font-size: 13px;
			}
			ul {
				padding-inline-start: 16px;
				list-style-type: disc;
				font-size: 13px;
				@media screen and (max-width: 991px) {
					margin-bottom: 16px;
				}
			}
		}
		&-img-wrap {
			flex: 0 0 45%;
			display: flex;
			align-items: center;
			@media screen and (min-width: 992px) {
				justify-content: center;
				padding: 5% 5% 5% 0;
			}
			img {
				max-width: 100%;
				@media screen and (max-width: 991px) {
					max-width: 200px;
					margin-bottom: 20px;
				}
			}
		}
	}
	&-license {
		&-card {
			margin-top: 20px;
			background-color: #f5f5f7;
			border-radius: 8px;
			padding: 32px 28px;
			h2 {
				margin-top: 0;
				margin-bottom: 6px;
				font-weight: bold;
				font-size: 16px;
			}
			p {
				color: #777777;
				font-size: 13px;
				margin-bottom: 15px;
				font-size: 13px;
			}
		}
		&-input {
			flex: 1;
			&-row {
				@media screen and (min-width: 480px) {
					display: flex;
					gap: 10px;
					align-items: flex-end;
				}
				.awsm-wc-validate-license-btn {
					margin-bottom: 8px;
					flex: 0 0 80px;
					text-align: center;
					align-items: center;
					justify-content: center;
				}
				input[type="text"] {
					height: 36px;
				}
			}
		}
		&-notices {
			margin: 20px 0;
		}
	}
	&-chat-form-table {
		.dataviews-view-table
			thead
			th:has(.dataviews-view-table-header-button):not(:first-child) {
			width: 10%;
			text-align: center;
		}
		tbody td:not(:first-child) .dataviews-view-table__cell-content-wrapper {
			justify-content: center;
		}
		tr th:not(:first-child):not(:last-child) {
			padding-left: 12px;
			padding-right: 12px;
		}
	}
	&-widget-table {
		.dataviews-view-table
			thead
			th:has(.dataviews-view-table-header-button):last-child {
			width: 10%;
			text-align: center;
		}
		tr th:not(:first-child):not(:last-child) {
			padding-left: 12px;
			padding-right: 12px;
		}
		tbody td:not(:first-child) .dataviews-view-table__cell-content-wrapper {
			justify-content: center;
		}

		.dataviews-view-table
			thead
			th:has(.dataviews-view-table-header-button):not(:first-child) {
			text-align: center;
		}
	}
	&-tab-upgrade {
		color: #0fa400;
	}
}

.dataviews-footer {
	position: sticky;
	bottom: 0;
	left: 0;
	background-color: #fff;
	padding: 12px 48px;
	border-top: 1px solid #f0f0f0;
	flex-shrink: 0;
	z-index: 2;
}

textarea.awsm-wc-form-control {
	resize: none;
	height: 60px !important;
}
select.awsm-wc-form-control {
	appearance: none;
}
