/* Global Styles */
:root {
    --primary-color: #c4a661;
    --secondary-color: #8b7355;
    --background-color: #f5f5f5;
    --dark-bg: #2c2c2c;
    --light-text: #ffffff;
    --dark-text: #333333;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-color: #d4b671;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--dark-text);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Top Navigation */
.top-nav {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px var(--shadow-color);
    height: 60px;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: var(--hover-color);
}

.nav-btn.primary-btn {
    background-color: #C5A572;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-btn.primary-btn:hover {
    background-color: #B49162;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 60px);
}

/* Sidebars */
.left-sidebar {
    width: 250px;
    height: 100%;
    background-color: #f9f9f9;
    border-right: 1px solid #e0e0e0;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-section {
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.sidebar-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 2px solid #C5A572;
    padding-bottom: 5px;
}

.shape-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.shape-btn {
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.shape-btn:hover {
    background-color: #f0f0f0;
    border-color: #C5A572;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    padding: 1rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.canvas-wrapper {
    flex: 1;
    position: relative;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 0;
}

#designCanvas {
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.canvas-footer {
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
    margin-top: auto;
    height: 80px;
}

.preview-btn {
    background-color: #C5A572;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-btn:hover {
    background-color: #B49362;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.preview-btn i {
    font-size: 20px;
}

/* Style Controls */
.style-controls, .split-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.style-btn, .split-btn {
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-btn:hover, .split-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Color Grid */
.color-section h4 {
    margin: 1rem 0 0.5rem;
    color: var(--secondary-color);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Text Controls */
.text-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.text-controls input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.text-controls button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.text-controls button:hover {
    background-color: var(--hover-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.preview3d-modal {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    margin: 5vh auto;
}

.preview3d-container {
    width: 100%;
    height: calc(100% - 60px);
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.preview3d-modal h2 {
    color: #ffffff;
    margin: 0 0 20px 0;
    font-size: 24px;
}

.preview3d-modal .close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.preview3d-modal .close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Loading indicator for 3D preview */
.preview3d-loading,
.preview3d-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
}

.preview3d-loading i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    animation: spin 1s linear infinite;
}

.preview3d-error i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: #ff4444;
}

.preview3d-loading div,
.preview3d-error div {
    font-size: 18px;
    color: #ffffff;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Form Styles */
.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.form-header {
    margin-bottom: 20px;
    text-align: center;
}

.form-header h2 {
    color: #C5A572;
    font-size: 24px;
    margin-bottom: 8px;
}

.form-header p {
    color: #666;
    font-size: 14px;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.submit-btn {
    background: #C5A572;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background: #B49162;
}

.required-note {
    color: #666;
    font-size: 13px;
}

/* Share Link */
.share-link {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.share-link input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .left-sidebar {
        width: 240px;
    }
}

@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }
    
    .left-sidebar,
    .properties-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        overflow-y: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .canvas-container {
        height: auto;
        min-height: 400px;
        overflow: visible;
        padding: 0.5rem;
    }
    
    .toolbar {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: auto;
        padding: 5px;
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: var(--dark-bg);
    }
    
    .toolbar-group {
        margin: 5px;
        flex-wrap: nowrap;
    }
    
    .canvas-wrapper {
        margin: 10px;
        height: 350px;
    }
    
    #designCanvas {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
    }
    
    .app-container {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .top-nav {
        flex-direction: column;
        height: auto;
        padding: 15px 10px;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .nav-left, .nav-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        margin: 5px 0;
        gap: 5px;
    }
    
    .main-content {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    .left-sidebar,
    .properties-sidebar {
        width: 100%;
        height: auto;
        max-height: 150px;
        overflow-y: auto;
        border: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .left-sidebar {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        gap: 15px;
    }
    
    .sidebar-section {
        flex: 0 0 auto;
        min-width: 200px;
        border-bottom: none;
        border-right: 1px solid #e0e0e0;
        padding-right: 15px;
        margin-bottom: 0;
    }
    
    .sidebar-section:last-child {
        border-right: none;
    }
    
    .canvas-container {
        height: auto;
        min-height: 350px;
        padding: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    .canvas-wrapper {
        margin: 10px;
        height: 600px;
        overflow-y: visible;
        position: relative;
        border: 2px solid #C5A572;
        border-radius: 8px;
    }
    
    .canvas-container::before,
    .canvas-container::after {
        content: '';
        position: fixed;
        left: 50%;
        width: 50px;
        height: 50px;
        background: rgba(197, 165, 114, 0.9);
        border-radius: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        pointer-events: none;
    }
    
    .canvas-container::before {
        top: 80px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 30px;
    }
    
    .canvas-container::after {
        bottom: 100px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 30px;
    }
    
    .canvas-container::-webkit-scrollbar {
        width: 15px;
    }
    
    .canvas-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
        box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
    }
    
    .canvas-container::-webkit-scrollbar-thumb {
        background: #C5A572;
        border-radius: 10px;
        border: 2px solid #f1f1f1;
        box-shadow: 0 0 5px rgba(0,0,0,0.2);
    }
    
    .canvas-container::-webkit-scrollbar-thumb:hover {
        background: #b3945d;
    }
    
    .scroll-indicator-container {
        position: fixed;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 200px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 25px;
        box-shadow: 0 0 15px rgba(0,0,0,0.3);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 10px 0;
        border: 3px solid #C5A572;
    }
    
    .scroll-arrow {
        width: 50px;
        height: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #C5A572;
        font-size: 24px;
        background: white;
        border-radius: 50%;
        margin: 5px auto;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent;
        border: 2px solid #C5A572;
        transition: all 0.2s ease;
        user-select: none;
        -webkit-user-select: none;
    }
    
    .scroll-arrow:hover {
        background: #f9f3e8;
        transform: scale(1.1);
    }
    
    .scroll-arrow:active {
        background: #f0e8d4;
        transform: scale(0.95);
        box-shadow: 0 0 8px #C5A572;
    }
    
    .up-arrow:after {
        content: "UP";
        position: absolute;
        font-size: 9px;
        font-weight: bold;
        bottom: 9px;
        opacity: 0.7;
    }
    
    .down-arrow:after {
        content: "DOWN";
        position: absolute;
        font-size: 9px;
        font-weight: bold;
        bottom: 9px;
        opacity: 0.7;
    }
    
    .scroll-track {
        flex: 1;
        margin: 10px 0;
        width: 10px;
        background: #eee;
        border-radius: 5px;
        align-self: center;
        position: relative;
        box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
    }
    
    .scroll-thumb {
        position: absolute;
        width: 20px;
        height: 40px;
        left: -5px;
        background: #C5A572;
        border-radius: 10px;
        top: 0;
        box-shadow: 0 2px 3px rgba(0,0,0,0.2);
        transition: top 0.1s;
    }
    
    .canvas-wrapper {
        margin: 10px;
        height: 600px;
        overflow-y: visible;
        position: relative;
        border: 2px solid #C5A572;
        border-radius: 8px;
    }
    
    #designCanvas {
        width: 100%;
        height: 100%;
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        touch-action: pinch-zoom !important;
    }
}

@media (max-width: 576px) {
    .app-container {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow: auto;
    }
    
    .nav-btn {
        margin: 5px;
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .toolbar {
        position: sticky;
        top: 0;
        z-index: 100;
        overflow-x: scroll;
        justify-content: flex-start;
        padding: 5px 0;
        scrollbar-width: none;  /* Hide scrollbar for Firefox */
        -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
    }
    
    .toolbar::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome/Safari */
    }
    
    .toolbar-group {
        flex-shrink: 0;
        margin-right: 10px;
    }
    
    .tool-btn {
        padding: 5px;
        font-size: 12px;
    }
    
    .left-sidebar,
    .properties-sidebar {
        max-height: 120px;
    }
    
    .canvas-wrapper {
        height: 250px;
        margin: 5px;
    }
    
    .shape-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }
    
    .shape-btn {
        height: 35px;
        font-size: 14px;
    }
    
    .color-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 5px;
    }
    
    .color-btn {
        width: 30px;
        height: 30px;
    }
    
    /* Fix modal for mobile */
    .preview3d-modal {
        width: 95%;
        height: 85vh;
        padding: 15px;
    }
    
    .enquiry-modal {
        padding: 15px !important;
        margin: 10px !important;
        width: calc(100% - 20px) !important;
        max-height: 85vh !important;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Fix for canvas positioning and mobile touch events */
@media (max-width: 480px) {
    .nav-btn {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .nav-btn i {
        font-size: 14px;
    }
    
    .canvas-container {
        touch-action: none; /* Prevents default touch behaviors like scrolling */
        min-height: 250px;
    }
    
    .canvas-wrapper {
        height: 220px;
        margin: 5px;
    }
    
    #designCanvas {
        touch-action: none;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .main-content {
        height: auto;
    }
    
    .tool-btn {
        min-width: 26px;
        height: 26px;
        padding: 2px;
        font-size: 12px;
    }
    
    .toolbar-group {
        padding: 0 3px;
        margin: 0 3px;
    }
    
    .shape-btn {
        height: 30px;
        font-size: 12px;
    }
    
    .color-btn {
        width: 24px;
        height: 24px;
    }
    
    .preview-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .canvas-footer {
        padding: 5px;
        height: auto;
    }
    
    /* Make sure popups and modals are well-sized */
    .modal-content {
        width: 95%;
        padding: 10px;
    }
    
    .swal2-popup {
        width: 90% !important;
        font-size: 12px !important;
    }
}

.toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: 5px;
    padding: 0 10px;
    border-right: 1px solid #ddd;
}

.toolbar-group:last-child {
    border-right: none;
}

.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.tool-btn:active {
    background-color: #e0e0e0;
}

.tool-btn i {
    font-size: 18px;
}

.enquiry-modal {
    max-width: 800px !important;
    margin: 20px auto !important;
    height: auto !important;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
    padding: 30px !important;
}

#enquiryForm {
    padding: 0;
    width: 100%;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

/* Custom scrollbar for the modal */
.enquiry-modal::-webkit-scrollbar {
    width: 8px;
}

.enquiry-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.enquiry-modal::-webkit-scrollbar-thumb {
    background: #C5A572;
    border-radius: 4px;
}

.enquiry-modal::-webkit-scrollbar-thumb:hover {
    background: #B49162;
}

/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #C5A572;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-section {
    margin-top: 15px;
}

.upload-container {
    margin-bottom: 15px;
}

.hidden-input {
    display: none;
}

.upload-button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #C5A572;
    color: white;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-button:hover {
    background-color: #B49162;
}

.uploaded-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.uploaded-image-item {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.uploaded-image-item img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    cursor: pointer;
}

.image-name {
    padding: 5px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delete-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.delete-image:hover {
    background: rgba(255,0,0,1);
}

/* Regular sidebar (right side) */
.sidebar {
    width: 280px;
    background-color: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 1rem;
    height: 100%;
}

.properties-sidebar {
    border-left: 1px solid var(--border-color);
    border-right: none;
}

.tool-section {
    margin-bottom: 2rem;
}

.tool-section h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

/* Other style sections that need to be retained */

/* Clear Canvas Button Styling */
#clearCanvasBtn {
    color: #ff5252;
}

#clearCanvasBtn:hover {
    background-color: #ff5252;
    color: white;
    border-color: #ff5252;
}

/* Bending Tool Styles */
.canvas-wrapper {
    position: relative;
}

.bend-confirm-btn,
.bend-cancel-btn {
    position: absolute;
    bottom: 100px;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    font-weight: bold;
}

.bend-confirm-btn {
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    margin-right: 5px;
}

.bend-cancel-btn {
    left: calc(50% + 110px);
    transform: translateX(-50%);
    background-color: #F44336;
    color: white;
}

.bend-confirm-btn:hover {
    background-color: #45a049;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.bend-cancel-btn:hover {
    background-color: #e53935;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.canvas-wrapper .cutting-hint {
    position: absolute;
    padding: 10px 15px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    border-radius: 4px;
    z-index: 1000;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 400px;
    text-align: center;
}

/* Cutting Tool Styles */
.cutting-hint {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.9);
    color: white;
    padding: 15px;
    border-radius: 8px;
    z-index: 9999;
    text-align: center;
    border: 2px solid red;
    box-shadow: 0 0 15px rgba(0,0,0,0.7);
    max-width: 400px;
    width: auto;
    font-size: 14px;
    line-height: 1.5;
    pointer-events: auto;
}

.hint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 5px;
}

.cut-cancel-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 10px;
}

.cut-cancel-btn:hover {
    background: rgba(255,255,255,0.4);
}

.hint-content p {
    margin: 5px 0;
}

/* Highlight the cut button when active */
#cutBtn.active {
    background-color: #ff5252;
    color: white;
    border-color: #ff5252;
    box-shadow: 0 0 10px rgba(255,82,82,0.5);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 82, 82, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
    }
}

/* Style for the cursor when in cutting mode */
.cutting-mode {
    cursor: crosshair !important;
}

/* Additional mobile-specific fixes */
@media (max-width: 768px) {
    /* Adjust object handles for better touch interaction */
    .canvas-container .upper-canvas {
        touch-action: none !important;
    }
    
    /* Make sure touch events work correctly */
    .canvas-wrapper {
        touch-action: none;
    }
    
    /* Fix 3D preview on mobile */
    .preview3d-container canvas {
        width: 100% !important;
        height: 100% !important;
    }
}

/* Keyframes for various animations */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes pulse {
    0% { 
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 10px rgba(197, 165, 114, 0.5);
    }
    50% { 
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 0 20px rgba(197, 165, 114, 0.8);
    }
    100% { 
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 10px rgba(197, 165, 114, 0.5);
    }
} 