@import "../blocks/plugins/feedback/editor.scss";

* {
	box-sizing: inherit;
}

:root {
	--o-dash-primary: #ED6F57;
	--o-dash-block-icon: #313233;
	--o-dash-block-text: #3c434a;
	--o-dash-disable-opacity: 0.35;
	--o-dash-secondary-text: #757575;
}

#wpbody-content > .error, #wpbody-content > .info, #wpbody-content > .notice {
	display: none !important;
}

.settings_page_otter {
	background: #f6f6f6;
	font-size: 14px;
	position: relative;
	box-sizing: border-box;
	font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
}

#wpcontent {
	padding-left: 0;
}

.auto-fold {
	#wpcontent {
		padding-left: 0;
	}
}

#otter {
	--main-link-color: #2271b1;

	.components-button {
		&.is-primary {
			--wp-admin-theme-color: var(--o-dash-primary);
			--wp-admin-theme-color-darker-20: #d5654f;
			--wp-admin-theme-color-darker-10: #dd6851;
		}

		&.is-link {
			color: var(--main-link-color);
		}
	}

	.otter-header {
		padding: 20px 10px 0 10px;
		background-color: #ffffff;
		box-shadow: 0 1px 0 rgba(213,213,213,0.5),0 1px 2px #eee;

		.otter-container {
			margin: 0 auto;
			max-width: 100%;
			max-width: 930px;

			.otter-logo {
				display: flex;
				align-items: center;
				justify-content: space-between;

				img {
					max-width: 200px;
				}

				.version {
					background-color: #e5e5e5;
					border-radius: 3px;
					font-size: 0.8em;
					font-weight: 400;
					margin-left: 10px;
					padding: 2px 7px;
				}

				@media ( max-width: 960px ) {
					justify-content: center;
				}
			}

			.otter-navigation {
				display: flex;
				flex-wrap: wrap;
				font-size: 15px;
				font-weight: 600;
				line-height: 1.5;
				list-style: none;
				padding-top: 25px;
				text-decoration: none;

				@media ( max-width: 960px ) {
					flex-direction: column;
					justify-content: center;
				}

				button {
					display: inline-flex;
					background: none;
					margin: 0;
					border: 0;
					cursor: pointer;
					margin-right: 8px;

					&:hover {
						span {
							color: #282828;
						}
						border-bottom: 3px solid #e5e5e5;
					}

					&.is-active {
						border-bottom: 3px solid #1E7DB2;

						span {
							color: #282828;
							cursor: default;
						}

						@media ( max-width: 960px ) {
							border-bottom: 0;
							border-left: 3px solid #1E7DB2;
						}
					}

					span {
						color: #868686;
						padding: 0px 16px 16px 16px;
						font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
						font-size: 21px;
						font-weight: 400;
						line-height: 25px;
						letter-spacing: 0px;
						text-decoration: none;
						cursor: pointer;

						@media ( max-width: 960px ) {
							padding: 10px;
						}
					}

					@media ( max-width: 960px ) {
						width: 100%;
						justify-content: center;
					}
				}
			}
		}
	}

	.otter-main {
		margin-left: auto;
		margin-right: auto;
		max-width: 930px;

		display: grid;
		grid-template-columns: 2fr 1fr;
		gap: 25px;


		&:is(.is-upsell, .is-blocks) {
			grid-template-columns: auto;
		}

		&.is-blocks {
			gap: 10px;
		}

		&.is-feedback .components-panel__body {
			height: max-content;
		}

		@media ( max-width: 960px ) {
			grid-template-columns: auto;
		}

		.components-panel__body {
			margin: 25px 0;
			background: #fff;
			border: 1px solid #e2e4e7;
			border-radius: 10px;

			&.is-opened {
				.components-panel__body-toggle {
					border-bottom: 1px solid #d6e2ed;

					&:hover {
						border-bottom: 1px solid #d6e2ed !important;
						background: #E8E8E8;
					}
				}
			}

			.components-panel__body-toggle {
				&:hover {
					background: #E8E8E8;
				}
			}

			&.is-pro {
				.components-panel__body-title {
					.components-button {
						display: flex;
						flex-direction: row-reverse;
						justify-content: flex-end;
					}

					span::after {
						content: "Pro";
						text-transform: uppercase;
						margin-left: 10px;
						background: #1E7DB3;
						color: #fff;
						padding: 4px 6px;
						border-radius: 2px;
						font-size: 8px;
						position: relative;
						top: -1px;
					}
				}
			}

			.otter-info {
				.otter-license-footer {
					align-items: center;
					display: flex;
					margin-top: 20px;
					gap: 10px;

					&.is-expired {
						flex-direction: column;
						align-items: flex-start;
					}

					.dashicon {
						margin-right: 10px;
						align-items: center;
						border-radius: 50%;
						color: #fff;
						display: inline-flex;
						justify-content: center;
						padding: 2px;
						background: #6eb77a;;
					}

					p {
						margin: 0;
					}
				}

				ul {
					list-style: disc;
					font-weight: 450;
					padding: inherit;
					font-size: 14px;
				}

				.otter-license-purchase-history {
					margin: 10px 0 0 0;
				}
			}

			input[type="text"],
			input[type="password"] {
				border: 1px solid #b7c9d9;
				border-radius: 3px;
				font-size: 14px;
				padding: 9px 15px;
				width: 100%;
				box-shadow: none;
				height: 40px;
				margin: 0 0 10px 0;
				color: #444;

				&:disabled {
					background: #f6f6f6;
					border-color: #eeeeee;
					color: #bbbbbb;
				}

				&:focus {
					border-color: var(--main-link-color);
					box-shadow: 0 0 0 1px var(--main-link-color);
					outline: 2px solid transparent;
					outline-offset: -2px;
				}
			}

			.components-panel__row {
				padding: 10px;
				margin: 0;

				&:first-of-type {
					padding-top: 20px;
				}

				.components-base-control {

					.components-base-control__field {
						display: flex;
						align-items: center;
						margin-bottom: 10px;
					}

					&.otter-button-field {
						width: 100%;

						.components-base-control__field {
							display: block;

							.components-base-control__label {
								font-weight: 600;
								margin-bottom: 10px;
							}

							.otter-button-group {
								display: flex;
								align-items: center;
								margin: 2px 0 15px;

								.is-secondary {
									padding: 2px 20px;
									font-size: 14px;
									margin-right: 10px;
									color: var(--main-link-color);
									box-shadow: inset 0 0 0 1px var(--main-link-color);

									&:focus {
										box-shadow: inset 0 0 0 1.5px var(--main-link-color);
									}
								}

								.components-external-link {
									margin-right: 10px;
								}
							}
						}
					}
				}
			}

			.otter-info {
				padding: 0 10px 10px;

				h3 {
					font-weight: 400;
					margin-top: 1em;
					margin-right: 0px;
					margin-bottom: 25px;
					margin-left: 0px;
				}

				p {
					margin: 0 0 1.5em 0;
				}

				.otter-info-links {
					li {
						margin-bottom: 15px;
					}

					a {
						color: #2271b1;
						text-decoration: none;
					}
				}

				.otter-info-button-group {
					display: flex;

					&.is-single {
						display: grid;
					}

					.components-button {
						justify-content: center;
					}

					.is-default,
					.is-secondary {
						padding: 2px 20px;
						font-size: 14px;
						color: var(--main-link-color);
						box-shadow: inset 0 0 0 1px var(--main-link-color);

						&:not(:last-child) {
							margin-right: 15px;
						}

						&:focus {
							box-shadow: inset 0 0 0 1.5px var(--main-link-color);
						}
					}
				}
			}
		}

		.otter-upsell {
			.upsell-title {
				padding: 20px 0 0;

				h2 {
					font-weight: 500;
					font-size: 28px;
					line-height: normal;
				}
			}

			.upsell-table {
				padding: 0;
				margin: 30px 0;
				list-style: none;

				li {
					background: #FFFFFF;
					margin: 0 !important;
					display: grid;
					grid-template-columns: 5fr 1fr 1fr;
					border-bottom: 1px solid #D9D9D9;

					&:nth-child(2n+1) {
						background: #F6F6F6;
					}
				}

				.t-head {
					padding: 20px 0;
					color: #30436e;
					font-size: 25px;
				}

				.t-row {
					border-left: 1px solid #D9D9D9;
					border-right: 1px solid #D9D9D9;

					.c {
						border-left: 1px solid #D9D9D9;
					}
				}

				.c {
					display: flex;
					align-items: center;
					justify-content: center;
					color: var(--o-dash-secondary-text);
				}

				.content {
					padding: 20px 40px;
					color: var(--o-dash-secondary-text);

					p {
						margin: 10px 0;
					}
				}

				.h-wrap {
					display: flex;
					align-items: center;

					h4 {
						color: var(--o-dash-block-text);
						margin: 10px 0;
						font-size: 20px;
						line-height: 1.2;
						font-weight: 500;
					}
				}
			}

			.components-button {
				width: 100%;
				justify-content: center;
				font-size: 1.2em;
				padding: 30px;
			}
		}

		.notice-card {
			grid-column: 1 / 3;
			position: relative;
			margin: 25px 0 -25px 0;
			padding: 25px;

			display: grid;
			grid-template-columns: minmax( 65px, 1fr ) auto 2fr;
			place-items: center;
			grid-column-gap: 25px;
			font-size: 13px;
			color: rgb(117, 117, 117);

			.notice-text:first-child {
				font-size: 32px;
				font-weight: 600;
			}

			.dismiss {
				position: absolute;
				top: 2px;
				right: 2px;
				color: #ccc;
				padding: 6px;
			}
		}
	}

	.otter-banner {
		margin: 0 auto;
		margin-top: 20px;
		max-width: 960px;
	}

	.otter-footer {
		text-align: center;
		color: #72777c;
		font-style: italic;
		border-top: 1px #e1e1e1 solid;
		border-bottom: 1px #e1e1e1 solid;
		padding: 20px;
		margin: 2rem 0 1.5rem;

		.otter-container {
			margin: 0 auto;
		}
	}

	.components-placeholder {
		background: #f6f6f6;
		margin-top: 25vh;
		margin-bottom: 25vh;
		box-shadow: none;

		.components-placeholder__fieldset {
			justify-content: center;
		}
	}

	.components-form-toggle.is-checked .components-form-toggle__track {
		background-color: var(--main-link-color);
	}

	#o-feedback {
		box-shadow: inset 0 0 0 1px var(--main-link-color);
    	color: var(--main-link-color);

		&:focus {
			box-shadow: inset 0 0 0 1.5px var(--main-link-color);
		}
	}

	:is(.components-textarea-control__input, .components-text-control__input):focus {
		border-color: var(--main-link-color);
		box-shadow: 0 0 0 1px var(--main-link-color);
	}
}

.otter-button-control {
	.components-base-control_labels {
		.components-base-control__label {
			font-weight: 600;
			margin-bottom: 10px;
		}
	}

	.otter-button-control-group {
		.components-button {
			padding: 2px 20px;
			font-size: 14px;
			margin-right: 10px;
		}
	}
}

.otter-modal-actions {
    display: flex;
	justify-content: flex-end;
	margin-top: 10px;

	.components-button {
		padding: 2px 20px;
		font-size: 14px;
		margin-right: 10px;

		&:last-child {
			margin: 0;
		}
	}
}

.components-modal__screen-overlay {
	background-color: rgba(0, 0, 0, 0.5);
}

.components-editor-notices__snackbar {
	position: fixed;
	bottom: 40px;
	padding-left: 16px;
	padding-right: 16px;
}

.o-blocks-header {
	display: flex;
	flex-direction: row;
	margin: 20px 0 0 0;

	.o-blocks-header__left {
		display: flex;
		flex-direction: row;

		align-items: center;
		flex-grow: 1;

		font-size: 21px;
		font-style: normal;
		font-weight: 600;

		h3 {
			margin: 0;
		}
	}

	.o-blocks-header__right {
		display: flex;
		flex-direction: row;

		align-items: center;

		height: max-content;

		padding: 0;

		gap: 5px;

		button {
			&.is-active {
				color: white;
				border-radius: 6px;
				background: var(--o-dash-primary);
			}

			&:disabled {
				opacity: var(--o-dash-disable-opacity);
			}
		}
	}
}

.o-block-cards {
	display: grid;
	flex-wrap: wrap;
	gap: 20px;
	margin: 10px 0;

	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));

	@media ( min-width: 1024px ) {
		grid-template-columns: repeat(3, minmax(250px, 1fr));
	}

	justify-content: center;
}

.o-block-card {
	display: flex;
	padding: 16px;
	flex-direction: row;

	flex-shrink: 0;
	gap: 10px;

	border-radius: 10px;
	border: 0.999px solid #E2E4E7;
	background: #FFF;

	align-items: center;
	justify-content: center;

	.o-block-card__icon {
		display: flex;
		min-width: 42px;
		height: 42px;
		width: 42px;
		justify-content: center;
		align-items: center;
		svg, span {
			width: 100%;
			height: 100%;

			color: var(--o-dash-block-text);
			flex-shrink: 0;
		}

		svg {
			* {
				fill: var(--o-dash-block-icon); // For icons that use fill for the shape.
			}

			&[data-target*="generator"] * {
				stroke: var(--o-dash-block-icon); // For icons that use stroke for the shape.
			}
		}

		&.is-disabled {
			opacity: var(--o-dash-disable-opacity);
		}

		span {
			font-size: 42px;
		}

	}

	.o-block-card__description {
		flex-grow: 1;

		display: flex;
		gap: 5px;

		flex-wrap: wrap;

		* {
			margin: 0;
			padding: 0;
		}

		h3 {
			font-family: sans-serif;
			font-size: 15px;
			font-style: normal;
			font-weight: 600;
			line-height: normal;

			color: var(--o-dash-block-text);

			flex-grow: 1;
			width: 100%;
		}

		a {
			color: var(--o-dash-secondary-text);
			text-decoration: none;

			font-family: sans-serif;
			font-size: 13px;
			font-style: normal;
			font-weight: 400;
			line-height: 140%; /* 18.2px */
		}
	}

	.o-block-card__action {
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 50px;

		.components-h-stack {
			gap: 0;
		}

		.components-toggle-control {
			margin: 0;
		}
	}

	.o-block-upsell {
		display: inline-flex;
		padding: 2px 8px;
		align-items: center;

		border-radius: 3px;
		background: var(--o-dash-primary);

		text-transform: uppercase;

		color: #FFF;
		font-family: sans-serif;
		font-size: 10px;
		font-style: normal;
		font-weight: 700;
		line-height: 160%; /* 16px */
		letter-spacing: 0.4px;
	}
}

.otter-deal {
	display: flex;
	align-items: center;
	justify-content: center;

	margin-top: 20px;

	a {
		position: relative;
	}

	img {
		width: 100%;
	}

	.o-urgency {
		position: absolute;

		top: 10%;
		left: 2.1%;

		color: #FFF;
		font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", sans-serif;
		font-size: 14px;
		font-style: normal;
		font-weight: 700;
		line-height: normal;
		letter-spacing: 0.3px;
		text-transform: uppercase;
	}
}

#otter .otter-ai-toolbar-actions {
	:is( .components-panel__body ) {
		margin: 10px 0;
	}

	.components-panel__body.is-opened .components-panel__body-title {
		margin-bottom: 10px;
	}
}

#otter .otter-main .otter-ai-toolbar-actions .components-panel__body:not(.is-opened) .components-panel__body-toggle {
	border-bottom: unset;;
}

#otter .otter-main .otter-ai-toolbar-actions .components-panel__body .components-base-control .components-base-control__field {
	margin-bottom: 0px;
}

.otter-nv-sidebar-upsell {
	max-width: 930px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;

	&.o-welcome {
		.otter-nv-sidebar-heading {
			h2 {
				font-size: 20px;
				font-weight: 600;
				color: #000;
			}
		}

		.otter-nv-sidebar-right {
			iframe {
				width: calc( 100% - 32px );
				height: 200px;

				@media(max-width: 991px) {
					width: 100%;
					height: 360px;
					padding: 32px;
				}
			}
		}
	}

	.otter-nv-sidebar-left{
		width: calc(100% - 360px);
		padding: 32px;
		@media(max-width: 991px) {
			width: 100%;
			padding: 16px;
		}
	}
	.otter-nv-sidebar-right{
		width: 360px;
		@media(max-width: 991px) {
			width: 100%;
		}
		img{
			max-width: 100%;
			width: 100%;
			height: auto;
			display: block;
		}
	}
	.otter-nv-sidebar-heading{
		display: flex;
		align-items: center;
		gap: 8px;
		padding-bottom: 24px;
		img{
			max-width: 155px;
			flex-shrink: 0;
			height: auto;
		}
		h2{
			margin: 0;
			color: #3B5DE6;
			font-size: 16px;

		}
	}
	.otter-nv-sidebar-text{
		padding-bottom: 12px;
		p{
			margin: 0;
		}
	}
	.otter-nv-sidebar-action{
		padding-top: 24px;
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		.components-button{
			&.is-primary{
				background: #3B5DE6 !important;
				&:focus:not(:disabled){
					box-shadow: none !important;
				}
			}
			&.is-secondary{
				.components-external-link__contents{
					text-decoration: none;
				}
			}
		}
		.done {
			display: flex;
			flex-direction: column;
			align-items: flex-start;
			a {
				width: auto;
			}
			p {
				font-size: 15px;
				font-weight: 500;
			}
		}
	}
	.otter-nv-sidebar-active-website{
		display: flex;
		gap: 24px;
		flex-wrap: wrap;
		color: #1F1D1D;
		>div{
			font-size: 10px;
			span{
				display: block;
				font-size: 12px;
				font-weight: 700
			}
		}
	}
	.otter-neve-progress {
		margin: 0;
		gap: 5px;
		font-size: 14px;
		display: flex;
		align-items: center;
		.spin {
			animation: otter-neve-rotation 2s infinite linear;
		}
	}
}

.otter-main {
	&.is-upsell + .otter-nv-sidebar-upsell {
		margin-top: 25px;
	}
	&.is-blocks + .otter-nv-sidebar-upsell {
		margin-top: 25px;
	}
}

.tc-panel-content-wrap {
	padding: 20px 10px 10px;

	.description {
		color: #757575;
		font-size: 12px;
		margin: 15px 0 0;
	}
}

.tc-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 25px;

	thead {
		font-weight: 500;
		font-size: 14px;
	}

	tr {
		border-bottom: 1px solid #e2e4e7;
	}

	td {
		padding: 5px 10px;

		&:last-child {
			text-align: right;
			padding-right: 0;
		}

		&:first-child {
			padding-left: 0;
		}
	}

	button.is-destructive {
		--wp-components-color-accent: #f84848;
		--wp-components-color-accent-darker-10: #d93838;
	}
}

.tc-sources-empty {
	text-align: center;
	padding: 20px;
	width: 100%;
	border: 2px dashed #e2e4e7;
	border-radius: 5px;

	h4 {
		margin-top: 15px;
		font-size: 20px;
	}
}

@keyframes otter-neve-rotation {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(359deg);
	}
}

@media(max-width: 480px) {
	.otter-deal .o-urgency {
		font-size: 7px;
	}
}

@media (min-width: 481px) and (max-width: 1024px) {
	.otter-deal .o-urgency {
		font-size: 10px;
	}
}

