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

.solution__merge-pdf {

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

	.solution__container {
		box-shadow: var(--solution-merge-pdf-shadow-color) 0 8px 24px;
		border: 1px solid var(--solution-merge-pdf-border-color);
		background-color: var(--solution-merge-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-merge-pdf-primary-color);
		white-space: wrap;
	}

	.solution__input {

		border: 1px solid var(--solution-merge-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-merge-pdf-secondary-color);
		color: var(--solution-merge-pdf-primary-color);
		font-weight: 500;
		cursor: pointer;
	}

	.solution__file-input:hover::-webkit-file-upload-button {
		background-color: var(--solution-merge-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-merge-pdf-btn-shadow-color);
		background: var(--solution-merge-pdf-secondary-color);
		color: var(--solution-merge-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-merge-pdf-tertiary-color);
		height: 0.65em;
		width: 0.65em;
		border-radius: 50%;
		animation: move 0.6s ease infinite;
	}

	.solution__link {
		color: var(--solution-merge-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-merge-pdf-input-border-color);
			color: var(--solution-merge-pdf-tertiary-color);
			box-shadow: 0 1px 2px 0 var(--solution-merge-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-merge-pdf-primary-color);
				box-shadow: 0 0 0 3px var(--solution-merge-pdf-secondary-color);
			}
		}

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

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

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

		/* Style for selected option */
		.solution__select-input option:not([disabled]) {
			color: var(--solution-merge-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;
	}

	.solution__sortable-container {
        cursor: move;
        display: flex;
        padding: 1rem;
        margin: .5rem 0;
        border: 1px dashed var(--solution-merge-pdf-primary-color);
        border-radius: 0.375rem;
        align-items: center;
        gap: 2rem;
    }
    .solution__preview-container {
        position: relative;
        padding: 1px 0;
        background-color: #E2EFF9;
        border-radius: 0.25rem;
        min-height: 60px;
        min-width: 60px;
        max-width: 60px;
        max-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .solution__preview-image {
        width: 60px;
        height: 60px;
        object-fit: contain;
    }
    .solution__file-info {
        display: flex;
        flex-direction: column;
        gap: .5rem;
    }

	.solution__actions-group {
        display: flex;
        gap: 1rem;
        margin-left: auto;
    }

	@media (max-width: 500px) {
		.solution__sortable-container {
			flex-wrap: wrap; /* Allow items to wrap to the next line */
			justify-content: center; /* Center item content */
			gap: 1rem;
		}
	
		.solution__sortable-container > :nth-child(1),
		.solution__sortable-container > :nth-child(2) {
			flex: 1 1 calc(50% - 0.5rem); /* Each takes 50% of the container width, minus gap */
		}
	
		.solution__sortable-container > :nth-child(3) {
			flex: 1 1 100%; /* Full width for the third item */
			justify-content: center; /* Center item content */
		}

		.solution__actions-group {
			margin-left: 0;
		}
	}
}

.solution__modal {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Full screen width */
    height: 100%; /* Full screen height */
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    z-index: 1000; /* Ensures modal appears on top */
}

/* Modal content styling */

.solution__toolbar {
    display: flex;
    position: absolute;
    justify-content: center; 
    align-items: center;
    gap: 0.1rem;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(240, 240, 240, 0.8);
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    z-index: 1000;
}

.solution__toolbar-button {
    padding: 10px 15px;
    cursor: pointer;
    color: black;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    background-color: transparent;
}

.solution__toolbar-button:hover {
    color: white;
}

.solution__pdf-renderer {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    background-color: #f4f4f4;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    max-width: 80%;
    max-height: 80%;
}

.solution__page-indicator {
    color: black;
    font-size: 16px;
    align-self: center;
    text-align: center;
	white-space: nowrap;
}

.solution__interactive-image {
  max-width: 80%;
  max-height: 80%;
  fit-object: contain;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
} 

@keyframes move {

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

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

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