:root {
	--solution-flatten-pdf-primary-color: #4f46e5;
	--solution-flatten-pdf-secondary-color: #eef2ff;
	--solution-flatten-pdf-tertiary-color: #000;
	--solution-flatten-pdf-background-color: #fff;
	--solution-flatten-pdf-border-color: #e5e7eb;
	--solution-flatten-pdf-input-border-color: #d1d5db;
	--solution-flatten-pdf-shadow-color: rgba(149, 157, 165, 0.2);
	--solution-flatten-pdf-btn-shadow-color: rgba(0, 0, 0, 0.05);
	--solution-flatten-pdf-dropdown-bg-color: #fff;
	--solution-flatten-pdf-dropdown-shadow-color-1: rgba(0, 0, 0, 0.1);
	--solution-flatten-pdf-dropdown-shadow-color-2: rgba(0, 0, 0, 0.1);
}

.solution__flatten-pdf {

	.solution__container-wrapper {
		padding: 1rem;
		display: flex;
		flex-direction: column;
		gap: 1rem;
		color: var(--solution-flatten-pdf-tertiary-color);
	}

	.solution__container {
		box-shadow: var(--solution-flatten-pdf-shadow-color) 0 8px 24px;
		border: 1px solid var(--solution-flatten-pdf-border-color);
		background-color: var(--solution-flatten-pdf-background-color);
		border-radius: 0.75rem;
		padding: 1.5rem 1.5rem 0.5rem;
		position: relative;
		display: flex;
		flex-direction: column;
		min-height: 180px;
		gap: 1rem;
	}

	.solution__header {
		font-size: 1.25rem;
		letter-spacing: 0.05em;
		font-weight: 500;
	}

	.solution__content {
		flex-grow: 1;
		display: grid;
	}

	.solution__form {
		display: flex;
		flex-direction: column;
		gap: 1rem;
	}

	.solution__label {
		white-space: nowrap;
		width: 100%;
		font-size: 0.75rem;
		font-weight: 500;
		display: flex;
		flex-direction: column;
		gap: 0.3rem;
	}

	.solution__hint {
		font-size: 0.75rem;
		font-weight: 500;
		color: var(--solution-flatten-pdf-primary-color);
		white-space: wrap;
	}

	.solution__input {

		border: 1px solid var(--solution-flatten-pdf-input-border-color);
		border-radius: 0.375rem;
		padding: 0.25rem 0.5rem;
		font-size: 1rem;
		line-height: 32px;
		outline: 1px solid transparent;
		outline-offset: -1px;
	}

	.solution__file-input::-webkit-file-upload-button {
		margin-right: 1rem;
		padding: 0.5rem 1rem;
		border-radius: 0.75rem;
		border: none;
		background-color: var(--solution-flatten-pdf-secondary-color);
		color: var(--solution-flatten-pdf-primary-color);
		font-weight: 500;
		cursor: pointer;
	}

	.solution__file-input:hover::-webkit-file-upload-button {
		background-color: var(--solution-flatten-pdf-secondary-color);
	}

	.solution__btn {
		display: inline-flex;
		align-items: center; /* Ensures the icon and text are aligned */
		justify-content: center;
		gap: 0.5rem; /* Adds space between the icon and the text */
		box-shadow: 0 1px 2px 0 var(--solution-flatten-pdf-btn-shadow-color);
		background: var(--solution-flatten-pdf-secondary-color);
		color: var(--solution-flatten-pdf-primary-color);
		padding: 0.5rem 1rem;
		border-radius: 1rem;
		font-weight: 600;
		cursor: pointer;
		border: none;
	}

	.solution__btn:hover {
		filter: brightness(0.98);
	}

	.solution__btn .dashicons {
		font-size: 1.2rem; /* Adjust the size of the icon */
		vertical-align: middle; /* Aligns the icon vertically with the text */
	}


	.solution__dropdown-wrapper {
		position: relative;
	}

	.solution__dropdown {
		position: relative;
		overflow: visible;
		background-color: transparent;
		box-shadow: none;
		width: 100%;
		border-radius: 0.75rem;
		max-height: 15rem;
		z-index: 10;
	}

	.solution__dropdown--hidden {
		display: none;
	}

	.solution__loading-section {
		display: none;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.solution__loading-container {
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 1rem;
		transition: 2s ease;
	}

	.solution__download-section {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		gap: 2rem;
		height: 100%;
	}

	.solution__download-section:last-child {
		margin-top: auto;
	}

	.solution__download-container {
		display: flex;
		flex-direction: column;
		flex-grow: 1;
		justify-content: center;
		align-items: center;
		gap: 1rem;
	}

	.solution__download-file-container {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 1rem;
	}

	.solution__download-file-name {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 12rem;
	}

	.solution__title-text {
		font-weight: 600;
	}

	.solution__text {
		font-weight: 500;
	}

	.solution__provided-text {
		display: flex;
		justify-content: center;
		font-size: 0.7rem;
		margin-top: 0.5rem;
	}

	.solution__error-section {
		display: flex;
		flex-direction: column;
		justify-self: center;
		align-self: center;
	}

	.solution__dot {
		background: var(--solution-flatten-pdf-tertiary-color);
		height: 0.65em;
		width: 0.65em;
		border-radius: 50%;
		animation: move 0.6s ease infinite;
	}

	.solution__link {
		color: var(--solution-flatten-pdf-tertiary-color);
	}

	.solution__select {
		display: flex;
		flex-direction: column;
		position: relative;
		gap: 0.3rem;

		.solution__select-input {
			height: 42px;
			padding: 0 0.5rem;
			border-radius: 0.375rem;
			border: 1px solid var(--solution-flatten-pdf-input-border-color);
			color: var(--solution-flatten-pdf-tertiary-color);
			box-shadow: 0 1px 2px 0 var(--solution-flatten-pdf-shadow-color);
			appearance: none;
			cursor: pointer;

			/* Arrow styling */
			background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%234f46e5' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
			background-repeat: no-repeat;
			background-position: right 1rem center;
			background-size: 1rem;

			&:focus {
				outline: 1px solid var(--solution-flatten-pdf-primary-color);
				box-shadow: 0 0 0 3px var(--solution-flatten-pdf-secondary-color);
			}
		}

		.solution__select-input option {
			padding: 1rem;
		}

		/* Placeholder color */
		.solution__select-input option[disabled] {
			color: var(--solution-flatten-pdf-input-border-color);
		}

		.solution__select-input:required:invalid {
			color: var(--solution-flatten-pdf-input-border-color);
		}

		/* Style for selected option */
		.solution__select-input option:not([disabled]) {
			color: var(--solution-flatten-pdf-tertiary-color);
		}
	}

	.solution_dropdown button {
		width: 100%;
	}

	.solution__dropdown-content {
		display: none;
		position: absolute;
		flex-direction: column;
		min-width: 100%;
		max-height: 150px;
		padding: 0.5rem 0;
		overflow: auto;
		background-color: #fff;
		box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
		z-index: 10;
		margin-top: 3px;
		border-radius: 10px;
		top: 100%;
		left: 50%;
		transform: translate(-50%, 0);
	}

	.solution__dropdown-content label {
		display: block;
		margin-top: 10px;
		padding: 0 1rem;
	}

	.solution__dropdown-button {
		min-width: 100%;
	}

	.solution__dropdown-content:hover,
	.solution__dropdown-button:focus + .solution__dropdown-content {
		display: flex;
	}

	.solution__group {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
	}

	.solution__group > div,
	.solution__group > label {
		flex: 1;
	}

}

@keyframes move {

	0% {
		transform: translateX(50%);
	}

	50% {
		transform: translateX(-50%);
	}

	100% {
		transform: translateX(50%);
	}
}
