.hostinger-reach-elementor-selector {
	display: block;
	margin-bottom: 8px;

	&__use,
	&__classic {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		padding: 10px 12px;
		border: 1px solid rgba(0, 0, 0, 0.1);
		border-radius: 8px;
		background: #fff;
		color: #673de6;
		font-size: 13px;
		font-weight: 600;
		cursor: pointer;

		&:hover,
		&:focus {
			background: #fff;
			color: #673de6;
		}
	}

	&__classic {
		margin-top: 12px;
	}
}

.hostinger-reach-elementor-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	border: 2px solid transparent;
	border-radius: 8px;
	background:
		linear-gradient(#fff, #fff) padding-box,
		linear-gradient(90deg, rgba(58, 176, 255, 1), rgba(103, 61, 230, 1), rgba(229, 54, 219, 1)) border-box;

	&__title {
		display: flex;
		align-items: center;
		gap: 8px;
		max-width: 100%;

		svg {
			flex-shrink: 0;
		}
	}

	&__name {
		font-weight: 700;
		font-size: 13px;
		color: #1e1e1e;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	&__image {
		width: 100%;
		height: auto;
		object-fit: cover;
		border-radius: 8px;
		background: #f0f0f0;
	}

	&__change {
		align-self: center;
		padding: 8px 12px;
		border: none;
		border-radius: 8px;
		background: transparent;
		color: #673de6;
		font-size: 13px;
		font-weight: 600;
		cursor: pointer;

		&:hover,
		&:focus {
			color: #673de6;
			background: rgba(103, 61, 230, 0.08);
		}
	}

	&__edit {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		padding: 8px 12px;
		border: 1px solid rgba(0, 0, 0, 0.1);
		border-radius: 8px;
		background: #fff;
		color: #673de6;
		font-size: 13px;
		font-weight: 600;
		text-decoration: none;

		&:hover,
		&:focus {
			background: #fff;
			color: #673de6;
		}

		svg {
			flex-shrink: 0;
		}
	}

	&__edit-text {
		color: #673de6;
	}
}

.hostinger-reach-elementor-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	background: rgba(0, 0, 0, 0.5);
}

.hostinger-reach-elementor-modal {
	display: flex;
	flex-direction: column;
	width: 90vw;
	max-width: 900px;
	height: 640px;
	max-height: calc(100vh - 64px);
	background: #fff;
	border-radius: 8px;
	overflow: hidden;

	&__header {
		display: flex;
		flex-shrink: 0;
		align-items: center;
		justify-content: space-between;
		padding: 16px 24px;
		border-bottom: 1px solid #e0e0e0;
	}

	&__title {
		margin: 0;
		font-size: 18px;
		font-weight: 600;
		color: #1e1e1e;
	}

	&__close {
		border: none;
		background: transparent;
		font-size: 24px;
		line-height: 1;
		color: #757575;
		cursor: pointer;
	}

	&__search {
		position: sticky;
		top: 0;
		z-index: 1;
		flex-shrink: 0;
		padding: 16px 24px;
		background: #fff;
	}

	&__search-input {
		width: 100%;
		height: 36px;
		padding: 0 12px;
		border: 1px solid #e0e0e0;
		border-radius: 6px;
		background: #fff;
		font-size: 13px;
		color: #1e1e1e;

		&:focus {
			outline: none;
			border-color: #673de6;
		}
	}

	&__body {
		display: grid;
		grid-template-columns: 1fr 1fr;
		flex: 1;
		min-height: 0;
	}

	&__empty,
	&__loading {
		display: flex;
		grid-column: 1 / -1;
		align-items: center;
		justify-content: center;
		text-align: center;
		color: #757575;
	}

	&__list-col {
		display: flex;
		flex-direction: column;
		min-height: 0;
		overflow-y: auto;
	}

	&__list {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px;
		align-content: start;
		padding: 24px;
	}

	&__no-results {
		grid-column: 1 / -1;
		padding: 24px 0;
		text-align: center;
		color: #757575;
	}

	&__empty-state {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 32px;
		max-width: 372px;
		margin: 0 auto;
		text-align: center;
	}

	&__empty-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 60px;
		height: 60px;
		border: 1px solid #ebebeb;
		border-radius: 12px;
		background: #fafafa;
	}

	&__empty-body {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 24px;
	}

	&__empty-text {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 4px;
	}

	&__empty-title {
		margin: 0;
		font-size: 18px;
		font-weight: 600;
		color: #1e1e1e;
	}

	&__empty-subtitle {
		margin: 0;
		font-size: 13px;
		color: #757575;
	}

	&__empty-action {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}

	&__empty-create {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 8px 12px;
		border-radius: 8px;
		background: #18181a;
		color: #fff;
		font-size: 13px;
		font-weight: 600;
		text-decoration: none;

		&:hover {
			background: #000;
		}
	}

	&__empty-refresh {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 8px 12px;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		background: transparent;
		color: #18181a;
		font-size: 13px;
		font-weight: 600;
		cursor: pointer;

		&:hover {
			background: rgba(0, 0, 0, 0.04);
		}
		padding: 16px;
	}

	&__no-results {
		grid-column: 1 / -1;
		padding: 24px 0;
		text-align: center;
		color: #757575;
	}

	&__empty-state {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 32px;
		max-width: 372px;
		margin: 0 auto;
		text-align: center;
	}

	&__empty-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 60px;
		height: 60px;
		border: 1px solid #ebebeb;
		border-radius: 12px;
		background: #fafafa;
	}

	&__empty-body {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 24px;
	}

	&__empty-text {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 4px;
	}

	&__empty-title {
		margin: 0;
		font-size: 18px;
		font-weight: 600;
		color: #1e1e1e;
	}

	&__empty-subtitle {
		margin: 0;
		font-size: 13px;
		color: #757575;
	}

	&__empty-action {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}

	&__empty-create {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 8px 12px;
		border-radius: 8px;
		background: #18181a;
		color: #fff;
		font-size: 13px;
		font-weight: 600;
		text-decoration: none;

		&:hover {
			background: #000;
		}
	}

	&__empty-refresh {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 8px 12px;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		background: transparent;
		color: #18181a;
		font-size: 13px;
		font-weight: 600;
		cursor: pointer;

		&:hover {
			background: rgba(0, 0, 0, 0.04);
		}
	}

	&__item {
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding: 0;
		border: none;
		background: transparent;
		cursor: pointer;
		text-align: left;
	}

	&__item-name {
		font-weight: 700;
		font-size: 14px;
		color: #1e1e1e;
	}

	&__item-thumb {
		width: 100%;
		height: 140px;
		object-fit: cover;
		background: #f5f5f6;
		border-radius: 16px;
		border: 3px solid transparent;
		transition: border-color 0.2s ease;
	}

	&__item.is-selected &__item-thumb {
		border-color: #673de6;
	}

	&__preview {
		display: flex;
		flex-direction: column;
		min-height: 0;
		overflow-y: auto;
		padding: 24px;
		background: #f5f5f6;
	}

	&__preview-frame {
		width: 100%;
		height: 100%;
		min-height: 320px;
		border: 1px solid #e0e0e0;
		border-radius: 12px;
		background: #fff;
	}

	&__footer {
		display: flex;
		flex-shrink: 0;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 8px;
		padding: 16px 24px;
		border-top: 1px solid #e0e0e0;
	}

	&__footer-start {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	&__footer-actions {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-left: auto;
	}

	&__refresh {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 34px;
		height: 34px;
		padding: 0;
		border: 1px solid #e0e0e0;
		border-radius: 4px;
		background: #fff;
		color: #1e1e1e;
		cursor: pointer;

		&:hover,
		&:focus {
			border-color: #c9c9c9;
		}

		svg {
			width: 16px;
			height: 16px;
		}
	}

	&__create {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 8px 16px;
		border: 1px solid #e0e0e0;
		border-radius: 4px;
		background: #fff;
		color: #1e1e1e;
		font-weight: 500;
		text-decoration: none;
		cursor: pointer;

		&:hover,
		&:focus {
			color: #1e1e1e;
			border-color: #c9c9c9;
		}
	}

	&__cancel {
		padding: 8px 16px;
		border: 1px solid #e0e0e0;
		border-radius: 4px;
		background: #fff;
		color: #1e1e1e;
		cursor: pointer;
	}

	&__continue {
		padding: 8px 16px;
		border: none;
		border-radius: 4px;
		background: #673de6;
		color: #fff;
		cursor: pointer;

		&:disabled {
			opacity: 0.5;
			cursor: not-allowed;
		}
	}

	@media (max-width: 768px) {
		&__body {
			grid-template-columns: 1fr;
		}

		&__list {
			grid-template-columns: 1fr;
		}

		&__preview {
			display: none;
		}
	}
}

.hostinger-reach-elementor-spinner {
	display: inline-block;
	width: 32px;
	height: 32px;
	border: 3px solid rgba(103, 61, 230, 0.2);
	border-top-color: #673de6;
	border-radius: 50%;
	animation: hostinger-reach-elementor-spin 0.8s linear infinite;
}

@keyframes hostinger-reach-elementor-spin {
	to {
		transform: rotate(360deg);
	}
}
