/* ===== Select Dropdowns ===== */
.sc-fp-select {
	width: 100%;
	padding: 12px 40px 12px 16px;
	font-size: 14px;
	font-family: inherit;
	color: var(--sc-fp-text);
	background-color: var(--sc-fp-bg);
	border: 1px solid var(--sc-fp-border);
	border-radius: var(--sc-fp-radius-sm);
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	transition: var(--sc-fp-transition);
}

.sc-fp-select:hover {
	border-color: var(--sc-fp-border-dark);
}

.sc-fp-select:focus {
	outline: none;
	border-color: var(--sc-fp-primary);
	box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.sc-fp-container .sc-fp-hidden-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ===== Custom Select Dropdowns ===== */
.sc-fp-custom-select {
	position: relative;
	width: 100%;
}

.sc-fp-custom-select-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
	color: var(--sc-fp-text);
	background-color: var(--sc-fp-bg);
	border: 2px solid var(--sc-fp-border);
	border-radius: var(--sc-fp-radius-sm);
	cursor: pointer;
	transition: var(--sc-fp-transition);
	text-align: left;
}

.sc-fp-container .sc-fp-custom-select-trigger:hover {
	border-color: var(--sc-fp-border-dark);
	color: var(--sc-fp-text) !important;
	background-color: transparent;
}

.sc-fp-custom-select.open .sc-fp-custom-select-trigger {
	border-color: var(--sc-fp-border);
}

.sc-fp-select-arrow {
	flex-shrink: 0;
	color: var(--sc-fp-text-secondary);
	transition: transform 0.2s ease;
}

.sc-fp-custom-select.open .sc-fp-select-arrow {
	transform: rotate(180deg);
}

.sc-fp-custom-select-options {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: 280px;
	overflow-y: auto;
	background: var(--sc-fp-bg);
	border: 1px solid var(--sc-fp-border);
	border-radius: var(--sc-fp-radius-sm);
	box-shadow: var(--sc-fp-shadow-lg);
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all 0.2s ease;
}

.sc-fp-custom-select.open .sc-fp-custom-select-options {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sc-fp-custom-option {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
	color: var(--sc-fp-text);
	background: transparent;
	border: none;
	cursor: pointer;
	text-align: left;
	transition: background-color 0.15s ease;
}

.sc-fp-container .sc-fp-custom-option:hover {
	background-color: var(--sc-fp-bg-secondary);
	color: var(--sc-fp-text) !important;
}

.sc-fp-container .sc-fp-custom-option:hover .sc-fp-font-preview-title,
.sc-fp-container .sc-fp-custom-option:hover .sc-fp-font-preview-body,
.sc-fp-container .sc-fp-custom-option:hover .sc-fp-font-preview-separator,
.sc-fp-container .sc-fp-custom-option:hover .sc-fp-palette-name,
.sc-fp-container .sc-fp-custom-option:hover .sc-fp-select-text {
	color: var(--sc-fp-text) !important;
}

.sc-fp-custom-option.selected {
	background-color: rgba(67, 97, 238, 0.08);
}

.sc-fp-custom-option.hidden {
	display: none;
}

/* ===== Text Label in Custom Dropdown Trigger ===== */
.sc-fp-select-text {
	font-size: 14px;
	font-weight: 500;
	color: var(--sc-fp-text);
}

/* ===== Font Preview in Dropdown ===== */
.sc-fp-select-preview,
.sc-fp-font-option {
	display: flex;
	align-items: center;
	gap: 6px;
}

.sc-fp-font-preview-title {
	font-weight: 600;
	font-size: 14px;
	color: var(--sc-fp-text) !important;
}

.sc-fp-font-preview-separator {
	color: var(--sc-fp-text-secondary) !important;
	font-size: 12px;
}

.sc-fp-font-preview-body {
	font-weight: 400;
	font-size: 13px;
	color: var(--sc-fp-text-secondary) !important;
}

/* ===== Palette Preview in Dropdown ===== */
.sc-fp-palette-preview,
.sc-fp-palette-option {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	width: 100%;
}

.sc-fp-palette-swatch {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	flex-shrink: 0;
}

.sc-fp-palette-name {
	margin-left: 4px;
	font-size: 13px;
	color: var(--sc-fp-text) !important;
}


/* ===== Randomize Button ===== */
.sc-fp-randomize-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 500;
	font-family: inherit;
	color: var(--sc-fp-text);
	background-color: var(--sc-fp-bg);
	border: 2px solid var(--sc-fp-border-dark);
	border-radius: var(--sc-fp-radius-sm);
	cursor: pointer;
	transition: var(--sc-fp-transition);
}

.sc-fp-container .sc-fp-randomize-btn:hover {
	background-color: var(--sc-fp-bg-secondary);
	border-color: var(--sc-fp-border-dark);
	color: var(--sc-fp-text) !important;
}

.sc-fp-randomize-btn:active {
	transform: scale(0.98);
}

.sc-fp-randomize-btn svg {
	transition: transform 0.3s ease;
}

.sc-fp-randomize-btn:hover svg {
	transform: rotate(180deg);
}

/* ===== Preview Wrapper ===== */
.sc-fp-preview-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
	max-width: 100%;
}

/* ===== Preview Header ===== */
.sc-fp-preview-header {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	max-width: 100%;
	margin-top: -100px;
	justify-content: space-between;
}

.sc-fp-preview-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 12px;
	flex-grow: 0.5;
}

.sc-fp-preview-label {
	font-size: 16px;
	font-weight: 600;
	flex-shrink: 0;
	white-space: nowrap;
}

.sc-fp-preview-font-pickers {
	display: flex;
	gap: 8px;
	flex-grow: 1;
	min-width: 0;
}

.sc-fp-preview-letters {
	display: flex;
	align-items: flex-end;
	gap: 2px;
}

.sc-fp-letter-icon {
	height: 110px;
	width: auto;
	flex-shrink: 0;
}

.sc-fp-letter-icon.sc-fp-letter-icon-s {
	height: 140px;
}

.sc-fp-inline-select {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	max-width: none;
}

.sc-fp-inline-select .sc-fp-custom-select-trigger {
	overflow: hidden;
	max-width: 100%;
	min-width: 40%;
}

.sc-fp-inline-select-trigger {
	padding: 8px 12px !important;
	gap: 8px;
	min-height: 40px;
	border-radius: var(--sc-fp-radius-sm);
	border: 2px solid var(--sc-fp-border);
}

.sc-fp-inline-select-trigger:hover {
	border-color: #c4d0e5;
	background: #ffffff;
}

.sc-fp-inline-select.open .sc-fp-inline-select-trigger {
	border-color: var(--sc-fp-border);
}

.sc-fp-inline-select .sc-fp-custom-select-options {
	top: calc(100% + 4px);
	border-radius: var(--sc-fp-radius-sm);
	min-width: 220px;
	left: 0;
	right: auto;
	width: max-content;
	max-width: 280px;
}

.sc-fp-inline-select.open {
	z-index: 120;
}

.sc-fp-inline-select-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--sc-fp-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

.sc-fp-inline-select-text {
	font-size: 13px;
	font-weight: 500;
	color: var(--sc-fp-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	flex: 1;
}

.sc-fp-preview-font-option {
	padding: 10px 12px;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}

.sc-fp-preview-font-family {
	display: block;
	width: 100%;
	min-width: 0;
	font-size: 14px;
	color: var(--sc-fp-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media screen and (max-width: 768px) {
	.sc-fp-preview-letters {
		display: none;
	}
	.sc-fp-preview-header {
		margin-top: 0;
	}
}

@media screen and (max-width: 600px) {
	.sc-fp-inline-select .sc-fp-custom-select-options {
		left: -60%;
	}
}