.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: 0;
		border: none;
		background: transparent;
		color: #673de6;
		font-size: 13px;
		cursor: pointer;

		&:hover,
		&:focus {
			color: #673de6;
			text-decoration: underline;
		}
	}

	&__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;
	}

	&__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 {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-auto-rows: 190px;
		gap: 16px;
		align-content: start;
		min-height: 0;
		overflow-y: auto;
		padding: 16px;
	}

	&__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%;
		flex: 1;
		min-height: 0;
		object-fit: cover;
		background: #f5f5f5;
		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: 16px;
		background: #f5f5f5;
	}

	&__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;
		}
	}
}

.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);
	}
}
