/**
 * Image Builder Styles
 */

.image-builder-container {
	max-width: 1200px;
	margin: 40px auto;
	padding: 20px;
}
.image-builder-container {
    margin-top: 0;
}

.image-builder-container h2 {
	text-align: center;
	margin-bottom: 30px;
	font-size: 2em;
	color: #333;
}

.image-builder-container h3 {
	font-size: 16px;
	margin-bottom: 15px;
	color: #444;
}

/* Canvas and Images Layout */
.canvas-layout {
	display: flex;
	gap:35px;
	margin-bottom: 30px;
	align-items: flex-start;
}

.canvas-wrapper {
	flex: 0 0 78%;
	max-width: 78%;
}

/* Source Images Section (20% Right) */
.source-images {
	flex: 0 0 22%;
	max-width: 22%;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 8px;
	height: fit-content;
}

.source-images h3 {
	font-size: 14px;
	margin-bottom: 15px;
	text-align: center;
	    color: #000;
    font-weight: 600;
}

.image-gallery {
	display: flex;
	flex-direction: column;
	gap: 15px;
	align-items: center;
}

.draggable-image {
	width: 100%;
	max-width: 150px;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	cursor: grab;
	border: 3px solid #ddd;
	border-radius: 8px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
div#canvasArea .dropped-image {
    height: auto !important;
}
.image-gallery {
    font-weight: 600;
    text-align: center;
}
.image-gallery img {
    margin-top: 10px;
}

.draggable-image:hover {
	/* transform: scale(1.05); */
	border-color: #007bff;
	box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.draggable-image:active {
	cursor: grabbing;
}

/* Responsive Layout */
@media (max-width: 768px) {
	.canvas-layout {
		flex-direction: column;
	}

	.image-gallery label {
    font-size: 12px;
    line-height: 18px;
}
	
	.canvas-wrapper,
	.source-images {
		flex: 0 0 100%;
		max-width: 100%;
	}

	/* Show source images first on mobile */
	.source-images {
		order: -1;
		width: 100%;
	}
	
	.canvas-wrapper {
		order: 1;
	}
	
	.image-gallery {
		/* flex-direction: row; */
		justify-content: center;
		flex-wrap: nowrap;
		gap: 10px;
	}
	
	.draggable-image {
		max-width: 100px;
		flex: 1;
	}
}

/* Canvas Area */
.canvas-area {
	min-height: 604px;
	height: 604px;
	width: 100%;
	background: #fff;
	border: 3px dashed #ccc;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 15px;
	position: relative;
	background-image: 
		repeating-linear-gradient(0deg, #f0f0f0, #f0f0f0 1px, transparent 1px, transparent 20px),
		repeating-linear-gradient(90deg, #f0f0f0, #f0f0f0 1px, transparent 1px, transparent 20px);
	transition: all 0.3s ease;
}

.canvas-area.drag-over {
	border-color: #007bff;
	background-color: #f0f8ff;
	border-style: solid;
}

.canvas-placeholder {
	text-align: center;
    color: #000;
    font-size: 14px;
    padding: 100px 20px;
    pointer-events: none;
    font-weight: 600;
}

.canvas-area.has-images .canvas-placeholder {
	display: none;
}

/* Dropped Images in Canvas */
.dropped-image {
	position: absolute;
	cursor: move;
	border: 1px solid transparent;
	border-radius: 2px;
	box-shadow: none;
	transition: all 0.2s ease;
	overflow: visible;
}

.dropped-image:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	z-index: 10;
}

.dropped-image.selected {
	border-color: #28a745;
	border-width: 2px;
	box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.3), 0 2px 8px rgba(0,0,0,0.2);
	z-index: 11;
}

.dropped-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
}

.dropped-image .delete-btn {
	position: absolute;
	top: -12px;
	right: -12px;
	width: 24px;
	height: 24px;
	background: #dc3545;
	color: white;
	border: 2px solid white;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	font-weight: bold;
	line-height: 21px;
	text-align: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.3);
	transition: all 0.2s ease;
	display: none;
	z-index: 15;
}

.dropped-image.selected .delete-btn {
	display: block;
}

.dropped-image .delete-btn:hover {
	background: #c82333;
	transform: scale(1.1);
}

.dropped-image .duplicate-btn {
	position: absolute;
	top: -12px;
	left: -12px;
	width: 24px;
	height: 24px;
	background: #17a2b8;
	color: white;
	border: 2px solid white;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	font-weight: bold;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.3);
	transition: all 0.2s ease;
	display: none;
	z-index: 15;
}

.dropped-image.selected .duplicate-btn {
	display: block;
}

.dropped-image .duplicate-btn:hover {
	background: #138496;
	transform: scale(1.1);
}

.dropped-image .resize-handle {
	position: absolute;
	bottom: -10px;
	right: -10px;
	width: 20px;
	height: 20px;
	background: #007bff;
	border: 2px solid white;
	border-radius: 50%;
	cursor: nwse-resize;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
	display: none;
}

.dropped-image.selected .resize-handle {
	display: block;
}

.dropped-image .rotate-handle {
	position: absolute;
	top: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 25px;
	height: 25px;
	background: #ffc107;
	color: white;
	border: 2px solid white;
	border-radius: 50%;
	cursor: grab;
	font-size: 14px;
	font-weight: bold;
	line-height: 21px;
	text-align: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
	transition: background 0.2s ease;
	display: none;
}

.dropped-image.selected .rotate-handle {
	display: block;
}

.dropped-image .rotate-handle:hover {
	background: #e0a800;
}

.dropped-image .rotate-handle:active {
	cursor: grabbing;
}

/* Canvas Controls */
.canvas-controls {
	/* text-align: center; */
	margin-bottom: 20px;
}

/* Form Styles */
.image-builder-form {
	width: 100%;
	padding: 25px;
	background: #f9f9f9;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	margin-top: 0;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 1em;
}

.form-group label::after {
	content: ' *';
	color: #dc3545;
	font-weight: bold;
}

.form-group input,
.form-group select {
	width: 100%;
	padding: 12px;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-size: 1em;
	transition: border-color 0.3s ease;
	box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-group input.input-error {
	border-color: #dc3545;
	background-color: #fff5f5;
}

.form-group input.input-error:focus {
	border-color: #dc3545;
	box-shadow: 0 0 0 3px rgba(220,53,69,0.1);
}

.field-error {
	display: none;
	margin-top: 5px;
	font-size: 0.85em;
	color: #dc3545;
	font-weight: 500;
}

/* intlTelInput Styling */
.iti {
	width: 100%;
	display: block;
}

.iti__flag-container {
	padding: 0;
}

.iti__selected-flag {
	padding: 0 8px 0 12px;
	background-color: #fff;
}

.iti input.full-width-phone {
	width: 100%;
	padding: 12px 12px 12px 60px !important;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-size: 1em;
	transition: border-color 0.3s ease;
	box-sizing: border-box;
}
ul.iti__country-list {
    margin-left: 0 !important;
}
.iti input.full-width-phone:focus {
	border-color: #007bff;
	box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
	outline: none;
}

.iti input.full-width-phone.input-error {
	border-color: #dc3545;
	background-color: #fff5f5;
}

.iti input.full-width-phone.input-error:focus {
	border-color: #dc3545;
	box-shadow: 0 0 0 3px rgba(220,53,69,0.1);
}

.iti__country-list {
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	border: 1px solid #ddd;
	max-height: 200px;
	border-radius: 4px;
	margin-top: 2px;
}

.iti__divider {
	border-bottom: 1px solid #ddd;
	margin: 5px 0;
}

.iti__country.iti__highlight {
	background-color: #f0f8ff;
}

.iti__country:hover {
	background-color: #f9f9f9;
}

.iti__search-input {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9em;
}

.iti__search-input:focus {
	border-color: #007bff;
	outline: none;
}

/* Buttons */
.btn-primary,
.btn-secondary {
	    padding: 7px 30px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.btn-primary {
	background: #007bff;
	color: white;
	width: 100%;
}

 

.btn-primary:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
}

.btn-secondary {
	background: #6c757d;
	color: white;
}

.btn-secondary:hover {
	background: #5a6268;
}

/* Form Messages */
.form-message {
	margin-top: 20px;
	padding: 15px;
	border-radius: 4px;
	font-weight: 500;
	display: none;
}

.form-message.success {
	display: block;
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.form-message.error {
	display: block;
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* reCAPTCHA */
.g-recaptcha {
	margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
	.image-gallery {
		flex-direction: row;
		justify-content: center;
		flex-wrap: nowrap;
		gap: 10px;
	}
	.canvas-layout {
    align-items: normal;
}
	
	.draggable-image {
		width: 120px;
		height: 120px;
	}
	
	.canvas-area {
		        height: 300px;
        min-height: 300px;
	}
	
	.image-builder-form {
		padding: 20px;
	}

	/* Smaller control buttons for mobile */
	.dropped-image .delete-btn,
	.dropped-image .duplicate-btn {
		width: 15px;
        height: 15px;
        font-size: 10px;
        line-height: 16px;
        top: -8px;
	}
	
	.dropped-image .delete-btn {
		right: -8px;
	}
	
	.dropped-image .duplicate-btn {
		left: -8px;
	}
	
	.dropped-image .rotate-handle {
		width: 15px;
        height: 15px;
        font-size: 10px;
        line-height: 16px;
        top: -8px;
	}
	
	.dropped-image .resize-handle {
		width: 15px;
		height: 15px;
		bottom: -7px;
		right: -7px;
	}
	.dropped-image.selected{
		    border-width: 1px;
	}
}


 

 /* WebKit (Chrome, Safari, new Edge) */
.canvas-size-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;               /* make it a circle */
  background: #b01326; /* thumb color */
  cursor: pointer;
  margin-top: -8px; /* vertically center thumb relative to track (adjust as needed) */
}


button#submitBtn {
    width: 150px;
    padding: 10px;
    background: #011332;
    font-size: 16px;
    font-weight: normal;
}

button#clearCanvas {
    background-color: #b01326 !important;
    color: #fff !important;
    text-decoration: none;
}

.image-gallery img {
    width: 150px;
	    object-fit: contain;
}

/* Spinner animation for submit button */
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}


.imagebuilderwrap  .vc_column-inner.vc_custom_1763625714499 {
    padding-left: 0px !important;
}