/* Frontend Styles for Customize Design By Techxanders */

/* Design Button on Product Page */
.cdbt-design-button-wrapper {
    margin: 20px 0;
}

.cdbt-design-button {
    background: #0073aa !important;
    color: white !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    display: inline-block !important;
    transition: background-color 0.3s ease !important;
}

.cdbt-design-button:hover {
    background: #005a87 !important;
    color: white !important;
}

.cdbt-design-button.disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.cdbt-design-button.disabled:hover {
    background: #ccc !important;
    color: #666 !important;
}

.cdbt-design-info {
    font-style: italic;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

/* Design Page Layout */
.cdbt-design-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.cdbt-design-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.cdbt-design-header h1 {
    margin: 0;
    color: #fff;
}

.cdbt-design-actions {
    display: flex;
    gap: 10px;
}

.cdbt-add-to-cart-btn {
    background: #28a745 !important;
    color: white !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.cdbt-add-to-cart-btn:hover {
    background: #218838 !important;
    color: white !important;
}

.cdbt-back-btn {
    background: #6c757d !important;
    color: white !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    border: none !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.cdbt-back-btn:hover {
    background: #5a6268 !important;
    color: white !important;
}

/* Main Content Layout */
.cdbt-design-content {
    display: flex;
    gap: 0px;
    min-height: 600px;
}

.cdbt-design-sidebar {
    width: 300px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 0px;
    border: 1px solid #dee2e6;
}

.cdbt-design-canvas {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #dee2e6;
	border-right:0px;
    border-radius: 0px;
}

#cdbt-canvas-container {
    position: relative;
    border: 0px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

#cdbt-design-canvas {
    display: block;
    cursor: crosshair;
    /* V12.12: Smooth image rendering for better quality when resizing */
    image-rendering: auto;
    -webkit-image-smoothing: high;
}

#cdbt-canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Control Sections */
.cdbt-control-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.cdbt-control-section:last-child {
    border-bottom: none;
}

.cdbt-control-section h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

/* Product Variations */
.cdbt-variation-option {
    margin-bottom: 15px;
}

.cdbt-variation-option label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.cdbt-variation-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

.cdbt-variation-select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Delete Button */
.cdbt-delete-btn {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

.cdbt-delete-btn:hover {
    background: #c82333 !important;
    color: white !important;
}

.cdbt-help-text {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
    margin: 0;
}

#cdbt-selected-element-info {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #495057;
}

.cdbt-control-section h4 {
    margin: 15px 0 10px 0;
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
}

/* Frame Size Options */
.cdbt-frame-option {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* .cdbt-frame-option:hover {
    background: #28a745 ;
    border-color: #28a745 !important;
} */

.cdbt-frame-option input[type="radio"] {
    margin-right: 10px;
}

.cdbt-frame-option label {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.cdbt-frame-price {
    color: #28a745;
    font-weight: 600;
}

.cdbt-price-display {
    margin-top: 15px;
    padding: 10px;
    background: #28a74536 !important;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    font-weight: 600;
    display: none; /* Hide by default */
}

/* Text Controls */
.cdbt-text-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#cdbt-text-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

#cdbt-add-text {
    background: #000;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
}

#cdbt-add-text:hover {
    background: #28a745 ;
}

/* Text Formatting */
.cdbt-formatting-controls {
    background: white;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 15px;
}

.cdbt-format-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.cdbt-format-row label {
    min-width: 80px;
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.cdbt-format-row input[type="range"] {
    flex: 1;
}

.cdbt-format-row input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.cdbt-format-row select {
    flex: 1;
    padding: 5px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.cdbt-format-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 5px;
}

.cdbt-format-btn:hover {
    background: #28a745;
}

.cdbt-format-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Image Upload */
.cdbt-image-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#cdbt-image-upload {
    display: none;
}

#cdbt-upload-image {
    background: #000;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
}
#cdbt-upload-attachment {
    background-color:#000;
}
#cdbt-upload-image:hover {
    background: #28a745 !important;
}

.cdbt-design-sidebar.cdbt-design-right {
    display:flex;
	flex-direction: column;
	 background-color: white;
	border-left:0px;
}
.cdbt-design-sidebar.cdbt-design-right h3{
	color:#000;
	text-align: center;
}
.cdbt-design-sidebar.cdbt-design-left {
    width: 400px ;
	background: #ffff;
}

/* Photo Gallery */
/* #cdbt-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
} */

.cdbt-gallery-photo {
    border: 0px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cdbt-gallery-photo:hover {
    border-color: #0073aa;
    transform: scale(1.05);
}

.cdbt-gallery-photo img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cdbt-design-content {
        flex-direction: column;
    }
    
    .cdbt-design-sidebar {
        width: 100%;
    }
    
    .cdbt-design-content {
        gap: 0px;
    }
}

@media (max-width: 768px) {
    .cdbt-design-container {
        padding: 10px;
    }
    
    .cdbt-design-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
     .cdbt-design-sidebar {
        width: 100% !important;
    }
    .cdbt-design-actions {
        justify-content: center;
    }
    
    .cdbt-text-controls {
        flex-direction: column;
    }
}

/* Cart and Order Customization Display */
.cdbt-cart-customization,
.cdbt-order-customization {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.cdbt-cart-customization p,
.cdbt-order-customization p {
    margin: 5px 0;
    font-size: 14px;
}

.cdbt-cart-design-image,
.cdbt-order-design-image {
    margin: 10px 0;
}

.cdbt-cart-design-image img,
.cdbt-order-design-image img {
    display: block;
    margin-top: 5px;
}

/* Admin Order Customization Display */
.cdbt-customization-header {
    width: 150px;
    text-align: center;
}

.cdbt-customization-cell {
    text-align: center;
    vertical-align: top;
    padding: 10px;
}

.cdbt-admin-design-image img {
    transition: transform 0.2s ease;
}

.cdbt-admin-design-image img:hover {
    transform: scale(1.1);
}

.cdbt-control-section label{
	
	color:#000!important;
}

#cdbt-text-input::placeholder {
  color: #fff; /* Replace with your desired color */
  opacity: 1;  /* Ensure the color is not transparent */
}

.cdbt-format-btn{
	background-color:#000!important;
}


.cdbt-attachment-upload h4, #cdbt-attachment-preview, #cdbt-text-input{
    
    color:#495057!important;
}

/* 
new-css */
div#cdbt-design-page {
    background: white;
    padding: 0;
}

.cdbt-design-header {
    background: rgb(40, 40, 44);
    padding: 10px 20px;
    margin: 0;
}

div#cdbt-photo-gallery > div {
    border: solid 1px black !important;
    width: 143px;
    margin: auto;
}

div#cdbt-photo-gallery {
    display: flex;
    flex-direction: column;
    gap: 7px;
    text-align: center;
}

.cdbt-design-sidebar.cdbt-design-right h3 {
    display: none;
}

.cdbt-design-sidebar.cdbt-design-right {
    align-items: center;
    justify-content: center;
}

button#cdbt-add-to-cart {
    padding: 14px 38px !important;
    height: auto !important;
    background: white !important;
    color: black !important;
}

.cdbt-design-actions {
    align-items: center;
    background: transparent !important;
}

.cdbt-design-actions a {
    background: transparent !important;
    padding: 0 !important;
    height: auto !important;
}

.cdbt-design-actions a:hover {
    background: transparent !important;
}

.cdbt-design-header h1 {
    font-size: 16px !important;
}
.customize-tabs ul {
    display: flex;
    justify-content: space-between;
}

.customize-tabs ul li img {
    width: auto;
    height: 30px;
}

.customize-tabs ul li {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 30%;
    padding-bottom: 10px;
}

.customize-tabs ul li span {
    color: black;
    font-size: 12px !important;
}

.customize-tabs {
    background: #fbfbfb !important;
    padding: 10px !important;
    padding-bottom: 0 !important;
}

.cdbt-design-sidebar.cdbt-design-left {
    padding: 0;
}

.cdbt-design-sidebar.cdbt-design-left {
    height: 83vh;
    overflow-y: scroll;
    position: relative;
}

.cdbt-control-section {
    padding: 20px;
}

.cdbt-design-sidebar.cdbt-design-right {
    height: 83vh;
}

.cdbt-design-content {
    min-height: unset;
}
.customize-tabs ul li {
    border-bottom: solid #00000000;
    transition: 0.5s;
}

.customize-tabs ul li:hover {
    background: #e0e0e052;
    border-bottom: solid black !important;
}
.cdbt-control-section { 
    display: none; 
}

.cdbt-control-section.active-section { 
    display: block; 
}
.customize-tabs ul li.active {
    border-bottom: 2px solid #000;
}
.cdbt-control-section.options-element {
    display: block;
}
.cdbt-control-section.options-element {
    display: block;
}
.cdbt-design-canvas {
    flex-direction: column;
}

.cdbt-control-section.options-element {
    padding: 0;
    border: none;
}
/* REMOVED: div#cdbt-element-controls display:block !important - was breaking show/hide logic */

.cdbt-control-section.options-element h3 {
    display: none;
}
.cdbt-control-section.options-element p#cdbt-selected-element-info {
    display: none;
}

.cdbt-control-section.options-element {
    margin: 0;
    position: absolute;
    top: 9px;
    z-index: 1;
}

.cdbt-design-canvas {
    position: relative;
}

button#cdbt-delete-element {
    font-size: 14px !important;
}

p#cdbt-no-selection {
    font-size: 11px;
}

div#cdbt-canvas-container {
    position: relative;
    top: 30px;
}

.cdbt-control-section h3 {
    font-size: 14px;
    margin-bottom: 6px;
    color: black;
}


.cdbt-control-section label {
    font-size: 12px;
}

div#cdbt-product-variations {
    margin-bottom: 12px;
}

.cdbt-frame-option {
    display: flex;
}
.customize-tabs ul li {
    cursor: pointer;
}
.close-removed {
display:none;
}
div#cdbt-selected-frame-price {
    margin-bottom: 10px;
}
@media (max-width: 768px) {
button#cdbt-add-to-cart {
    padding: 10px 18px !important;
    font-size: 14px !important;
}

.cdbt-design-actions a {
    font-size: 14px !important;
}

.cdbt-design-actions {
    justify-content: space-between !important;
    width: 100%;
    flex-direction: row-reverse;
}

.customize-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

.customize-tabs ul {
    margin: 0;
}

.cdbt-control-section.active-section {
    position: fixed;
    top: 0;
    z-index: 9;
    background: white;
    width: 100%;
    left: 0;
    right: 0;
    height: 100%;
    padding-top: 61px;
	 width: 83%;
    margin-left: auto;
    box-shadow: 4px 30px 135px 14px #00000040;
}
.close-removed {
    font-size: 20px;
    background: black;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: normal;
    border-radius: 26px;
    font-size: 13px;
    margin-bottom: 20px;
    margin-left: auto;
}

.cdbt-control-section {
   
}

select#size {
    width: 100%;
}
	.cdbt-design-sidebar.cdbt-design-left {
    height: auto;
}

.cdbt-design-sidebar.cdbt-design-right {
    height: auto;
}

canvas#cdbt-design-canvas {
    /* V12.12: NO CSS width/height - causes blur! Size set by JS canvas.width/height only */
    display: block;
    margin: 0 auto;
    /* Prevent any browser default stretching */
    max-width: none !important;
    width: auto !important;
    height: auto !important;
}

/* V12.12: Remove whitespace around canvas on mobile */
.cdbt-design-canvas {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

#cdbt-canvas-container {
    padding: 0 !important;
    margin: 0 auto !important;
}

div#cdbt-photo-gallery {
    flex-direction: row;
}

div#cdbt-photo-gallery > div {
    width: 100px;
}

div#cdbt-photo-gallery > div img {
    height: 100px !important;
}

div#cdbt-canvas-container {
    top: 47px;
    width: 100%; /* V12.12: Full width container */
    display: flex;
    justify-content: center; /* V12.12: Center canvas in container */
}

button#cdbt-delete-element {
    font-size: 12px !IMPORTANT;
    height: auto;
}

/* V12.12: Remove ALL whitespace around canvas on mobile */
.cdbt-design-content {
    height: 70vh;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 0 !important;
}

.cdbt-design-sidebar.cdbt-design-right {
    border: none !important;
}

.cdbt-design-canvas {
    border: none;
    padding: 0 !important;
    background: transparent !important;
}

/* V12.12: Canvas container full width, no padding */
#cdbt-canvas-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

select#cdbt-color-select {
    display: none;
}
/* new phone css */
.cdbt-control-section.text.active-section {
    height: 229px;
    bottom: 0 !IMPORTANT;
    top: unset;
    padding-top: 0px !important;
    width: 100%;
    overflow-y: scroll;
    padding-top: 20px !important;
}

/* V12.12: Fix font family dropdown on mobile */
#cdbt-font-family {
    -webkit-appearance: menulist;
    appearance: menulist;
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 8px !important;
    min-height: 40px;
    touch-action: manipulation;
}

/* V12.12: Ensure select dropdowns are interactive on mobile */
.cdbt-control-section.text.active-section select {
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
}

.close-removed {
    position: absolute;
    right: 7px;
    top: 9px;
}

button#cdbt-remove-bg-btn {
    padding: 8px 9px;
    height: auto;
    border-radius: 4px;
    font-size: 12px !important;
    margin: 0 !important;
    width: 120px;
}

div#cdbt-element-controls {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    gap: 20px;
    margin: auto;
}

div#cdbt-element-controls p {
    display: none !important;
}

button#cdbt-delete-element {
    width: 159px;
}

.cdbt-control-section.options-element {
    left: 0;
    right: 0;
}

div#cdbt-photo-gallery > div {
    width: 60px;
}

div#cdbt-photo-gallery > div img {
    height: 60px !important;
}

/* V12.11: Canvas size is now controlled by JS (25% larger) */
/* No CSS transform needed - JS sets actual dimensions */
div#cdbt-canvas-container {
    width: 100%;
}

/* V12.11: Ensure canvas area has enough space */
.cdbt-design-canvas {
    overflow: visible !important;
    padding-bottom: 60px !important;
}

p#cdbt-no-selection {
    text-align: center;
    margin: 5px 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
}

/* V12.12: Reduce top spacing on canvas container */
div#cdbt-canvas-container {
    top: 25px !important;
}

/* V12.12: Remove options element top spacing */
.cdbt-control-section.options-element {
    top: 0 !important;
    padding: 5px !important;
}
	
}
/* V12.12: Mobile Artwork Click Fix */
.cdbt-artwork-item {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cdbt-artwork-item * {
    pointer-events: none !important;
}

.cdbt-artwork-item {
    pointer-events: auto !important;
}

.cdbt-artwork-click-hint {
    pointer-events: none !important;
}

.cdbt-artwork-click-hint span {
    pointer-events: none !important;
}