/* Container styling */
#canvasdiv {
	display: block !important;
}

#container-canvas {
	max-width: 800px;
	margin: 0 auto;
	padding: 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	overflow: hidden;
	background: #fff;
}

.browse-link {
	color: #3253af;
	text-decoration: underline;
	cursor: pointer;
}

/* Image placeholder styling */
.image-placeholder {
	border: 1px solid #5e5e5e40;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-image:
		linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%),
		linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%),
		linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%);
	background-size: 20px 20px;
	background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
	background-color: #fff;
	position: relative;
	flex: 1;
	min-height: 0;
	z-index: 2;
}

.placeholder-content {
	text-align: center;
	/* color: #222222; */
	line-height: normal;
	margin: 6px;
	position: relative;
	z-index: 1;
}

.placeholder-icon {
	font-size: 29pt;
	margin-bottom: 10px;
}

.placeholder-icon img {
	width: auto;
	height: 72px;
}

#image-canvas {
	max-width: 100%;
	max-height: 100%;
	border-radius: 8px;
	cursor: crosshair;
}

/* Text input element for text tool */
.text-input-element {
	position: absolute;
	border: 2px solid rgba(220, 38, 38, 0.95);
	background: transparent;
	outline: none;
	font-family: 'Arial', sans-serif;
	min-width: 100px;
	padding: 4px 8px;
	box-sizing: border-box;
	z-index: 50;
	cursor: move;
}

.text-input-element:focus {
	border-color: rgba(220, 38, 38, 1);
}

.text-input-element::placeholder {
	color: rgba(150, 150, 150, 0.5);
	text-shadow: none !important;
}

/* History controls styling */
.history-controls {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	display: none;
	justify-content: space-between;
	pointer-events: none;
	z-index: 20;
}

.history-controls.visible {
	display: flex;
}

.history-btn {
	background: rgba(0, 0, 0, 0.7);
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	color: white;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10pt;
	pointer-events: auto;
	border: 1px solid white;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(6px);
}

.history-btn:hover:not(:disabled) {
	background: rgba(0, 0, 0, 0.9);
	transform: scale(1.1);
}

.history-btn:active:not(:disabled) {
	transform: scale(0.95);
}

.history-btn:disabled {
	background: rgba(0, 0, 0, 0.3);
	color: rgba(255, 255, 255, 0.4);
	cursor: not-allowed;
	transform: none;
}

.history-btn svg {
	pointer-events: none;
}

/* Image tools styling */
.image-tools {
	display: flex;
	justify-content: center;
	gap: 1px;
	flex-wrap: nowrap;
	overflow-x: hidden;
	overflow-y: hidden;
	flex: 0 0 auto;
	height: 41px;
	align-items: center;
}

.image-tools.insert-layer-mode {
	gap: 0;
}

.insert-layer-tool-hidden {
	display: none !important;
}

.tool-btn {
	background: rgba(0, 0, 0, 0.068);
	border: 1px solid #5e5e5e40;
	border-radius: 6px;
	font-size: 9pt;
	cursor: pointer;
	transition: all 0.3s ease;
	min-width: 39px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: inherit;
}

.tool-btn svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.editor-icon {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.tool-btn:hover {
	border-color: #3253af;
}

.tool-btn:active {
	transform: translateY(0);
}

.tool-btn.tool-active {
	border: 1px solid #f44336;
	position: relative;
}

.tool-btn.tool-active:hover {
	border-color: #d32f2f;
}

#insert-layer-merge-btn {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
    font-family: Verdana, sans-serif;
	font-size: 11pt;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #b91c1c;
	background: rgba(255, 248, 248, 0.96);
	border: 1px solid rgba(220, 38, 38, 0.45);
}

#insert-layer-merge-btn:hover {
	color: #991b1b;
	border-color: rgba(220, 38, 38, 0.85);
	background: rgba(255, 236, 236, 0.98);
}

.image-placeholder.insert-layer-active {
	box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.18);
}

.tool-close-icon {
	position: absolute;
	top: -8px;
	right: -8px;
	background: #f44336;
	color: white;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	pointer-events: none;
	z-index: 10;
}

/* Model selector styling */
.model-selector {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.model-selector label {
	font-weight: bold;
	font-size: 11pt;
}

.model-selector.insert-layer-filter-active label {
	color: #b91c1c;
}

.model-action-row {
	display: flex;
	gap: 6px;
}

.model-action-row .model-action-btn {
	flex: 1 1 0;
	min-width: 0;
	height: 34px;
	padding: 0 10px;
	border-radius: 16px;
	white-space: nowrap;
    font-family: Verdana, sans-serif;
	color: inherit;
}

.select-wrapper {
	position: relative;
	width: 100%;
}

.select-display {
	width: 100%;
	padding: 6px 16px;
	border: 1px solid #5e5e5e40;
	border-radius: 16px;
	background-color: rgba(0, 0, 0, 0.068);
	cursor: pointer;
	transition: border-color 0.3s ease;
	height: 30px;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 16px 12px;
	margin-left: 0;
	margin-right: 0;
	font-size: 10pt;
    font-family: Verdana, sans-serif;
	color: inherit;
}

.select-display option {
	font-size: 10pt;
}

.select-display:hover {
	border-color: #3253af;
}

.select-display:focus {
	outline: none;
	border-color: #3253af;
}

.select-display:disabled {
	opacity: 1;
	color: inherit;
	-webkit-text-fill-color: currentColor;
    font-family: Verdana, sans-serif;
	cursor: default;
}

.model-selector.insert-layer-filter-active .select-display {
	border-color: rgba(220, 38, 38, 0.45);
	background-color: rgba(255, 244, 244, 0.96);
	color: #991b1b;
	-webkit-text-fill-color: #991b1b;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b91c1c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.model-selector.insert-layer-filter-active .select-display:hover,
.model-selector.insert-layer-filter-active .select-display:focus {
	border-color: rgba(220, 38, 38, 0.85);
	background-color: rgba(255, 238, 238, 0.98);
}

.model-selector.insert-layer-filter-active #remove-background-btn {
	color: #991b1b;
	background: rgba(255, 244, 244, 0.96);
	border-color: rgba(220, 38, 38, 0.45);
}

.model-selector.insert-layer-filter-active #remove-background-btn:hover {
	color: #7f1d1d;
	background: rgba(255, 238, 238, 0.98);
	border-color: rgba(220, 38, 38, 0.85);
}

/* Prompt section styling */
.prompt-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 0 0 auto;
	min-height: 0;
}

.prompt-section label {
	font-weight: bold;
	font-size: 11pt;
}

.prompt-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex: 0 0 auto;
	height: 40px;
}

.clear-btn {
	background: rgba(255, 255, 255, 0.2);
}

.clear-btn:hover {
	background: rgb(255 255 255 / 50%);
	border-color: #3253af;
}

/* Save button group styling */
.save-button-group {
	display: flex;
	gap: 5px;
	align-items: center;
}

.btn-canvas {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	font-family: inherit;
	color: white;
}

.btn-canvas-label {
	display: none;
}

/* Mobile responsive class */
.disabled {
	filter: grayscale(100%) !important;
	pointer-events: none !important;
}

.disabled * {
	filter: grayscale(100%) !important;
	pointer-events: none !important;
}

/* Mobile start */
@media handheld,
only screen and (max-width: 899px) {
	.desktop {
		display: none !important;
	}
}

@media handheld,
only screen and (min-width: 900px) {

	/* Don't display mobile class on desktop */
	.mobile,
	.notindesktop,
	.mobile-tr,
	.mobile {
		display: none !important;
	}
}

@keyframes limeGradientShift {
	0% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0% 50%;
	}
}

/* Text Controls Styling */
#text-controls {
	position: fixed;
	bottom: 44px;
	right: 6px;
	left: 6px;
	width: calc(100% - 12px);
	max-width: 800px;
	margin: auto;
	background: rgb(30 30 35 / 70%);
	backdrop-filter: blur(5px);
	color: white;
	padding: 6px 2vw;
	border-radius: 8px;
	z-index: 100;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-rows: repeat(4, auto);
	gap: 1vw;
	align-items: center;
	box-sizing: border-box;
	height: 170px;
}

#text-controls label {
	font-size: 9pt;
	white-space: nowrap;
	justify-self: start;
}

#text-controls #live-font-size {
	width: 100%;
	justify-self: stretch;
}

#text-controls #live-size-display {
	font-size: 9pt;
	text-align: center;
	justify-self: end;
}

#text-controls input[type="color"] {
	width: 28px;
	height: 28px;
	/* width: 4vh; */
	border: none;
	border-radius: 4px;
	cursor: pointer;
	justify-self: end;
}

#text-controls input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 0 5px;
	cursor: pointer;
	justify-self: center;
}

#text-controls #finish-text {
	background: #f5f5f561;
	color: #111111;
	border: none;
	padding: 6px 3vw;
	border-radius: 6px;
	cursor: pointer;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	font-weight: bold;
	transition: all 0.3s ease;
	grid-column: 1 / -1;
	grid-row: 5;
	justify-self: center;
	min-width: 20vw;
	background: white;
}

#text-controls #finish-text:active {
	transform: translateY(0);
}

/* Resize Controls Styling - matches text controls design */
#resize-overlay {
	position: fixed;
	bottom: 44px;
	right: 6px;
	left: 6px;
	height: 170px;
	width: calc(100% - 12px);
	background: rgb(30 30 35 / 70%);
	backdrop-filter: blur(5px);
	color: white;
	padding: 6px 4vw;
	border-radius: 8px;
	z-index: 100;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-rows: auto repeat(2, auto) auto;
	gap: 1vw;
	align-items: center;
	box-sizing: border-box;
	max-width: 800px;
	margin: auto;
}

#resize-overlay h3 {
	grid-column: 1 / -1;
	grid-row: 1;
	margin: 0;
	text-align: center;
	font-size: 10.5pt;
	font-weight: bold;
	color: white;
}

#resize-overlay label {
	font-size: 9pt;
	white-space: nowrap;
	justify-self: start;
}

#resize-overlay input[type="number"] {
	width: 100%;
	padding: 6px;
	border: none;
	border-radius: 4px;
	font-size: 9pt;
	text-align: center;
	color: #333;
	justify-self: stretch;
}

#resize-overlay input[type="number"]:disabled {
	opacity: 0.5;
	background-color: #f5f5f5;
}

#resize-overlay .checkbox-group {
	display: flex;
	align-items: center;
	gap: 0.5vw;
	justify-self: end;
}

#resize-overlay input[type="checkbox"] {
	width: 3vw;
	height: 3vw;
	cursor: pointer;
}

#resize-overlay .checkbox-group label {
	font-size: 9pt;
	cursor: pointer;
	margin: 0;
}

#resize-overlay #resize-apply {
	background: white;
	color: black;
	border: none;
	padding: 1vh 3vw;
	border-radius: 6px;
	cursor: pointer;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	font-weight: bold;
	transition: all 0.3s ease;
	grid-column: 1 / 2;
	grid-row: 4;
	justify-self: center;
	min-width: 15vw;
}

#resize-overlay #resize-cancel {
	background: white;
	color: crimson;
	border: none;
	padding: 1vh 3vw;
	border-radius: 6px;
	cursor: pointer;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	font-weight: bold;
	transition: all 0.3s ease;
	grid-column: 3 / 4;
	grid-row: 4;
	justify-self: center;
	min-width: 15vw;
}

#resize-overlay #resize-apply:active,
#resize-overlay #resize-cancel:active {
	transform: translateY(0);
}

/* Canvas zoom cursor states */
#image-canvas.zoom-available {
	cursor: zoom-in !important;
}

#image-canvas.zoom-active {
	cursor: zoom-out !important;
}

#image-canvas.color-picker-active {
	cursor: copy !important;
	/* Eyedropper icon alternative */
}

#image-canvas.brush-active {
	cursor: crosshair !important;
}

/* Color to Alpha Controls Styling - matches resize overlay design */
#color-to-alpha-overlay {
	position: fixed;
	bottom: 46px;
	right: 12px;
	left: 6px;
	height: 170px;
	width: calc(100% - 12px);
	background: rgb(30 30 35 / 70%);
	backdrop-filter: blur(5px);
	color: white;
	padding: 6px 2vw;
	border-radius: 8px;
	z-index: 100;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-rows: auto auto auto auto;
	gap: 1vw;
	align-items: center;
	box-sizing: border-box;
	max-width: 800px;
	margin: auto;
}

#color-to-alpha-overlay h3 {
	grid-column: 1 / -1;
	grid-row: 1;
	margin: 0;
	text-align: center;
	font-size: 10.5pt;
	font-weight: bold;
	color: white;
}

#color-to-alpha-overlay label {
	font-size: 9pt;
	white-space: nowrap;
	justify-self: start;
}

#color-to-alpha-overlay .color-picker-group {
	justify-self: start;
}

#color-to-alpha-overlay input[type="range"] {
	width: 100%;
	justify-self: stretch;
}

#color-to-alpha-overlay #tolerance-display {
	font-size: 9pt;
	color: #ccc;
	margin-left: 1vw;
}

#color-to-alpha-overlay .mode-group {
	grid-column: 1 / -1;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 2vw;
}

#color-to-alpha-overlay .mode-options {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

#color-to-alpha-overlay .mode-options>div {
	display: flex;
	align-items: center;
	gap: 1vw;
}

#color-to-alpha-overlay .mode-buttons {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-end;
}

#color-to-alpha-overlay input[type="radio"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

#color-to-alpha-overlay .mode-group label {
	font-size: 9pt;
	cursor: pointer;
	margin: 0;
}

#color-to-alpha-overlay #color-to-alpha-apply {
	background: white;
	color: black;
	border: none;
	padding: 1vh 2vw;
	border-radius: 6px;
	cursor: pointer;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	font-weight: bold;
	transition: all 0.3s ease;
	min-width: 12vw;
}

#color-to-alpha-overlay #color-to-alpha-cancel {
	background: white;
	color: crimson;
	border: none;
	padding: 1vh 2vw;
	border-radius: 6px;
	cursor: pointer;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	font-weight: bold;
	transition: all 0.3s ease;
	min-width: 12vw;
}

#color-to-alpha-overlay #replace-color-section {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1vw;
	align-items: center;
	padding: 6px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#color-to-alpha-overlay #replace-color-section label {
	grid-column: 1;
	margin: 0;
}

#color-to-alpha-overlay #replace-color-section input[type="color"] {
	grid-column: 2;
	justify-self: start;
}

/* Color Picker Group - for all tools with color picker + dropper */
.color-picker-group {
	display: flex;
	gap: 5px;
	align-items: center;
}

.color-picker-group input[type="color"] {
	width: 40px;
	height: 25px;
	border: none;
	border-radius: 3px;
	cursor: pointer;
}

.color-picker-group button {
	background: white;
	color: black;
	border: none;
	padding: 0 10px;
	border-radius: 3px;
	cursor: pointer;
	font-size: 10pt;
	transition: all 0.3s ease;
	height: 25px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
}

/* Brush Tool Styling */
#brush-overlay {
	position: fixed;
	bottom: 46px;
	right: 6px;
	left: 6px;
	width: calc(100% - 12px);
	max-width: 800px;
	margin: auto;
	background: rgb(30 30 35 / 70%);
	backdrop-filter: blur(5px);
	color: white;
	padding: 10px 2vw;
	border-radius: 8px;
	z-index: 100;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-rows: repeat(4, auto);
	gap: 1.25vw;
	align-items: center;
	box-sizing: border-box;
	height: 170px;
}

#brush-overlay h3 {
	grid-column: 1 / -1;
	margin: 0 0 6px 0;
	padding: 0;
	font-size: 10pt;
	color: white;
	text-align: center;
	font-weight: normal;
}

#brush-overlay label {
	color: white;
	font-size: 10pt;
	white-space: nowrap;
}

#brush-overlay input[type="range"] {
	width: 100%;
}

#brush-overlay #brush-size-display {
	color: white;
	font-size: 10pt;
	min-width: 30px;
	text-align: center;
}

#brush-overlay .color-picker-group {
	grid-column: 2 / -1;
}

#brush-overlay .brush-buttons {
	grid-column: 1 / -1;
	display: flex;
	gap: 2vw;
	margin-top: 6px;
	justify-content: center;
}

#brush-overlay button {
	padding: 10px 10px;
	font-size: 11pt;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.2s;
	font-weight: 500;
	background: white;
	color: black;
}

#brush-overlay #brush-cancel {
	color: crimson;
}

/* Arrow Tool Styling */
#arrow-overlay {
	position: fixed;
	bottom: 44px;
	right: 6px;
	left: 6px;
	width: calc(100% - 12px);
	max-width: 800px;
	margin: auto;
	background: rgb(30 30 35 / 70%);
	backdrop-filter: blur(5px);
	color: white;
	padding: 6px 2vw;
	border-radius: 8px;
	z-index: 100;
    font-family: Verdana, sans-serif;
	font-size: 9pt;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-rows: repeat(4, auto);
	gap: 1vw;
	align-items: center;
	box-sizing: border-box;
	height: 170px;
}

#arrow-overlay h3 {
	grid-column: 1 / -1;
	margin: 0 0 5px 0;
	padding: 0;
	font-size: 11pt;
	color: white;
	text-align: center;
	font-weight: normal;
}

#arrow-overlay label {
	color: white;
	font-size: 10pt;
	white-space: nowrap;
	text-align: right;
	padding-right: 5px;
}

#arrow-overlay .arrow-type-buttons {
	grid-column: 2 / -1;
	display: flex;
	gap: 5px;
	justify-content: flex-start;
}

#arrow-overlay .arrow-type-btn {
	padding: 10px 10px;
	font-size: 11pt;
	border-radius: 3px;
	background: white;
	border: 0;
	color: black;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 10px;
	height: 6px;
}

#arrow-overlay .arrow-type-btn.active {
	color: crimson;
}

#arrow-overlay input[type="range"] {
	width: 100%;
}

#arrow-overlay #arrow-width-display {
	color: white;
	font-size: 11pt;
	min-width: 10px;
	text-align: center;
}

#arrow-overlay .color-picker-group {
	grid-column: 2 / -1;
}

#arrow-overlay .arrow-buttons {
	grid-column: 1 / -1;
	display: flex;
	gap: 2vw;
	margin-top: 6px;
	justify-content: center;
}

#arrow-overlay .arrow-buttons button {
	padding: 5px 5px;
	font-size: 11pt;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.2s;
	font-weight: 500;
	min-width: 10vh;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#arrow-overlay #arrow-done {
	color: black;
	background: white;
}

#arrow-overlay #arrow-cancel {
	background: white;
	color: crimson;
}

#arrow-overlay #arrow-done:active,
#arrow-overlay #arrow-cancel:active {
	transform: translateY(0);
}

/* Shared positioning for bottom tool overlays (keeps all overlays aligned) */
#text-controls,
#resize-overlay,
#color-to-alpha-overlay,
#brush-overlay,
#arrow-overlay {
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	width: min(800px, calc(100% - 12px));
	max-width: min(800px, calc(100% - 12px));
	margin: 0;
	bottom: 46px;
}

#arrow-preview-canvas {
	position: absolute;
	pointer-events: none;
	z-index: 1000;
}

#image-canvas.arrow-active {
	cursor: crosshair !important;
}

.format-selection h3 {
	margin: 0 0 10px 0;
	font-size: 12pt;
}

.format-options {
	display: flex;
	gap: 5px;
	margin-bottom: 0vh;
	justify-content: center;
	flex-wrap: nowrap;
}

.format-option {
	flex: 1;
	min-width: 80px;
	max-width: none;
	padding: 7px 7px;
	color: whitesmoke;
	border-radius: 12px;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	background: rgb(30 30 35 / 70%);
	font-size: 0.9em;
}

.format-option.selected {
	background: rgb(0 0 0);
	color: white;
}

.format-icon {
	font-size: 24px;
	margin-bottom: 6px;
}

.format-name {
	font-size: 10pt;
	font-weight: bold;
	color: white;
}

.format-description {
	font-size: 9pt;
	color: white;
	line-height: 1.3;
}

.setting-item {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.setting-item label {
	min-width: auto;
}

.save-format-buttons {
	display: flex;
	gap: 0px;
	justify-content: center;
	flex-direction: column;
}

.save-format-buttons .login-btn {
	min-width: 120px;
	padding: 5px 10px;
}

/* Crop Tool Styles */
#crop-overlay-container {
	position: absolute;
	z-index: 1000;
	cursor: default;
}

#crop-dark-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: transparent;
	pointer-events: none;
}

#crop-box {
	position: absolute;
	border: 2px solid rgba(220, 38, 38, 0.95);
	cursor: move;
}

#insert-layer-overlay {
	position: absolute;
	z-index: 15;
	pointer-events: none;
}

.insert-layer-box {
	position: absolute;
	pointer-events: none;
}

.insert-layer-visual {
	position: absolute;
	inset: 0;
	border: 2px solid rgba(220, 38, 38, 0.95);
	background: transparent;
	cursor: move;
	pointer-events: auto;
	transform-origin: center center;
	z-index: 1;
}

.insert-layer-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: fill;
	pointer-events: none;
	user-select: none;
}

.insert-layer-handle {
	position: absolute;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid rgba(220, 38, 38, 0.95);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	pointer-events: auto;
	z-index: 3;
}

.insert-layer-rotate-handle {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgb(0 0 0 / 85%);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	border: 2px solid rgba(220, 38, 38, 0.95);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
	user-select: none;
	z-index: 4;
}

.insert-layer-rotate-handle::before {
	content: '';
	position: absolute;
	inset: -10px;
}

.btn-canvas {
	padding: 12px 12px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s;
	font-size: 10pt;
	font-weight: bold;
	font-family: inherit;
	border-radius: 12px;
	background: rgb(0 0 0 / 30%);
	color: white;
}

.btn-canvas:disabled {
	opacity: 0.45;
	filter: grayscale(100%);
	cursor: not-allowed;
}

#insert-btn {
	background: rgb(68 68 78 / 70%);
}

.btn-canvas-copy-text {
	gap: 8px;
}

.btn-canvas-copy-text:disabled {
	opacity: 1;
	filter: none;
}

.btn-canvas-copy-text .btn-canvas-label {
	display: inline;
	font-size: 10pt;
	font-family: inherit;
	line-height: 1;
	color: white;
}

@media only screen and (min-width: 701px) {
	.btn-canvas {
		gap: 8px;
	}

	.btn-canvas-label {
		display: inline;
		font-size: 10pt;
		font-family: inherit;
		line-height: 1;
		color: white;
	}
}

.crop-handle {
	position: absolute;
	width: 12px;
	height: 12px;
	background: #fff;
	border: 2px solid rgba(220, 38, 38, 0.95);
	border-radius: 50%;
}

#crop-dimensions {
	position: absolute;
	top: -30px;
	left: 50%;
	transform: translateX(-50%);
	background: rgb(30 30 35 / 70%);
	color: #fff;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	pointer-events: none;
}

#crop-controls {
	position: absolute;
	bottom: -50px;
	left: 50%;
	transform: translateX(-50%);
	background: rgb(30 30 35 / 70%);
	padding: 8px 12px;
	border-radius: 8px;
	display: flex;
	gap: 4px;
	align-items: center;
	white-space: nowrap;
}

.aspect-ratio-btn {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	border: 1px solid #5e5e5e40;
	padding: 5px 8px;
	border-radius: 12px;
	cursor: pointer;
	font-size: 13px;
    font-family: Verdana, sans-serif;
	transition: all 0.2s;
}

.aspect-ratio-btn:hover {
	border-color: #3253af;
	background: rgb(255 255 255 / 50%);
}

.aspect-ratio-btn.active {
	background: rgb(0 0 0);
	color: white;
	border-color: rgb(0 0 0);
}

.crop-apply-btn {
	background: forestgreen;
	color: #fff;
	border: none;
	padding: 4px 12px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	transition: background 0.2s;
}

.crop-cancel-btn {
	background: #d32f2f;
	color: #fff;
	border: none;
	padding: 4px 12px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	transition: background 0.2s;
}
