/* Neon Customizer - Matching Custom Neon Design */

/* Prevent body scroll on customizer page */
body.neon-customizer-page {
    overflow: hidden;
    height: 100vh;
}

/* Header */
.neon-customizer-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.neon-customizer-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

/* Main Tool Container */
.main-neon-tool {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.design-container.split-view {
    display: flex;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Left Side: Fixed Preview */
.preview-container.demo-box-side {
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
@media (min-width: 993px) {
    .preview-container.demo-box-side {
        width: 60%;
        height: 100%;
    }
}

.demo-text {
    width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15%;
    transition: background-image 0.3s ease;
}

/* Neon Text Display */
.text-show {
    font-size: 70px;
    font-family: 'Barcelona', Arial, sans-serif;
    color: #ff5ce8;
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor,
        0 0 40px currentColor;
    animation: neonPulse 2s ease-in-out infinite alternate;
    white-space: nowrap;
    text-align: center;
}

@keyframes neonPulse {
    from {
        text-shadow: 
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px currentColor,
            0 0 40px currentColor;
    }
    to {
        text-shadow: 
            0 0 15px currentColor,
            0 0 25px currentColor,
            0 0 35px currentColor,
            0 0 50px currentColor;
    }
}

/* Letter containers for multicolor (will be added by JS) */
.letter-container {
    display: inline-block;
    position: relative;
}

.text-layer {
    position: relative;
    z-index: 2;
}

.glow-layer {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    filter: blur(8px);
    opacity: 0.6;
}

/* Price Preview */
.total-sel-price.price-preview {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
}

/* Background Image Selector */
.background-images-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.background-images {
    display: flex;
    gap: 10px;
}

.background-image {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid transparent;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.background-image:hover {
    opacity: 1;
    transform: scale(1.05);
}

.background-image.active {
    border-color: #5761FE;
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(87, 97, 254, 0.3);
}

.background-image div,
.background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right Side: Scrollable Editor (40%) – desktop only; mobile uses full width below */
@media (min-width: 993px) {
.editor-container.form-wrapper {
    width: 40%;
    background: white;
    height: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
}

.editor-container.form-wrapper {
    background: white;
    position: relative;
    flex-shrink: 0;
}

.editor-content-container {
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
}

/* Steps */
.m-step {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.m-step:last-child {
    border-bottom: none;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.step-text {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #5761FE;
    color: white;
    font-weight: bold;
    margin-right: 10px;
    font-size: 16px;
}

.step-content {
    padding-left: 0;
}

.step-title {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.step-1-title {
    font-size: 15px;
    color: #666;
    margin-bottom: 15px;
}

/* Step 1: Text Input */
.step-1-input-container textarea {
    font-size: 1.1em;
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.logo-quote-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.logo-text {
    font-size: 14px;
    color: #666;
}

.quote-text {
    color: #5761FE;
    text-decoration: underline;
    font-size: 14px;
}

/* Step 2: Font Selection */
.font-dropdown-container {
    margin-bottom: 15px;
}

.font-dropdown {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.font-dropdown:hover {
    border-color: #5761FE;
}

.selected-font {
    font-size: 24px;
    font-weight: bold;
}

.font-image-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    list-style: none;
    margin: 0;
}

.font-image-container li {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.font-image-container li:hover {
    border-color: #5761FE;
    transform: translateY(-2px);
}

.font-image-container li.active {
    border-color: #5761FE;
    background: #f0f4ff;
}

.font-image-container li span {
    font-weight: bold;
}

/* Step 3: Color Selection */

#color-table {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.neon-color-item {
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.color-swatch-wrapper {
    padding: 3px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
}

.color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.color-swatch.active {
    border-color: #5761FE;
    box-shadow: 0 0 0 3px rgba(87, 97, 254, 0.2);
}

.neon-color-item:hover .color-swatch {
    transform: scale(1.1);
}

.color-name {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    text-align: center;
    font-weight: 500;
}

.color-examples-link {
    text-align: right;
    margin-top: 15px;
}

.color-examples-link a {
    color: #5761FE;
    text-decoration: underline;
    font-size: 14px;
}

/* Step 4: Size Selection */
#size-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.size-box {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}

.size-box:hover {
    border-color: #5761FE;
    transform: translateY(-2px);
}

.size-box.active {
    border-color: #5761FE;
    background: #f0f4ff;
}

.size-box .popular {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #FFD700;
    color: #333;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.size-box .popular::before {
    content: "POPULAR";
}

.size-name {
    font-weight: bold;
    font-size: 16px;
}

.s-price {
    font-weight: bold;
    font-size: 18px;
    color: #5761FE;
    text-align: right;
}

.s-size {
    font-size: 13px;
    color: #666;
}

.size-note {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.no-pad {
    padding: 0 !important;
}

/* Step 5: Indoor/Outdoor */
.indoor-outdoor-container {
    margin-bottom: 15px;
}

.custom-radio {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}

.custom-radio.selected {
    border-color: #5761FE;
    background: #f0f4ff;
}

.custom-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio label {
    cursor: pointer;
    margin: 0;
    width: 100%;
    display: block;
}

.radio-span {
    color: #5761FE;
    font-weight: bold;
}

.sign-note {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
}

/* Step 6 & 7: Backboard Style & Color */
.board-box-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.board-box {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.board-box:hover {
    border-color: #5761FE;
    transform: translateY(-2px);
}

.board-box.active {
    border-color: #5761FE;
    background: #f0f4ff;
}

.board-box-type {
    font-weight: bold;
    margin-bottom: 5px;
}

.board-box-price {
    font-size: 14px;
    color: #5761FE;
    font-weight: 600;
}

.back-board-colors {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.back-board-color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.back-board-color:hover {
    border-color: #5761FE;
}

.back-board-color.active {
    border-color: #5761FE;
    background: #f0f4ff;
}

.back-board-color-info {
    flex: 1;
}

.back-board-color-text {
    font-size: 14px;
    margin-bottom: 3px;
}

.back-board-color-price {
    font-size: 13px;
    color: #5761FE;
    font-weight: 600;
}

.back-board-color-img {
    width: 50px;
    height: 35px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Step 8: Options */
.add-to-cart-form {
    margin-bottom: 20px;
}

.custom-control.custom-checkbox {
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
}

.custom-control-label {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.custom-control-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: -30px;
    top: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.custom-control-input:checked ~ .checkmark {
    background-color: #5761FE;
    border-color: #5761FE;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-control-input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.wall-mount-kit-dropdown select {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.plug-style {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.plug-style label {
    font-weight: 600;
}

.plug-style select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Add to Cart Section */
.add-to-cart-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.total-section {
    margin-bottom: 15px;
}

.rush-order-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.total-sel-price {
    font-size: 24px;
    font-weight: bold;
    color: #5761FE;
}

.addtocart.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background: #5761FE;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.addtocart.add-to-cart-btn:hover {
    background: #4651de;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(87, 97, 254, 0.3);
}

.addtocart.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Utility Classes */
.hide {
    display: none !important;
}

/* Color Picker (for multicolor) */
#color-picker {
    position: fixed;
    background: white;
    border: 2px solid #5761FE;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
}

#color-picker #color-name {
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.color-swatch {
    width: 40px;
    height: 40px;
    display: inline-block;
    margin: 5px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #5761FE;
}

/* Scrollbar */
.editor-content-container::-webkit-scrollbar,
.font-image-container::-webkit-scrollbar {
    width: 8px;
}

.editor-content-container::-webkit-scrollbar-track,
.font-image-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.editor-content-container::-webkit-scrollbar-thumb,
.font-image-container::-webkit-scrollbar-thumb {
    background: #5761FE;
    border-radius: 4px;
}

/* Responsive – no split view on tablet/mobile: preview on top, scrollable settings below */
@media (max-width: 992px) {
    body.neon-customizer-page {
        overflow: auto;
        height: auto;
    }
    
    .main-neon-tool {
        position: relative;
        top: 0;
        height: auto;
        overflow: visible;
    }
    
    /* Single column: no left/right split */
    .design-container.split-view {
        display: flex !important;
        flex-direction: column !important;
        height: auto;
        overflow: visible;
    }
    
    /* Top: preview area (customization applied here) */
    .preview-container.demo-box-side {
        width: 100% !important;
        position: relative;
        height: 400px;
        min-height: 400px;
        flex-shrink: 0;
        order: 1;
    }
    
    /* Below: scrollable settings panel */
    .editor-container.form-wrapper {
        width: 100% !important;
        height: auto;
        overflow: visible;
        flex-shrink: 0;
        order: 2;
    }
    
    .editor-content-container {
        height: auto;
        overflow: visible;
        max-height: none;
    }
    
    .background-images-container {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 15px;
        padding: 0 15px;
    }
    
    .neon-customizer-header {
        position: relative;
    }
    
    #color-table {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    
    .color-swatch {
        width: 40px;
        height: 40px;
    }
}

/* Mobile: dark background only, no scene images; single column, scrollable settings */
@media (max-width: 767.98px) {
    /* Single column: preview at top, settings below – no split */
    .design-container.split-view {
        flex-direction: column !important;
    }
    
    .preview-container.demo-box-side {
        height: 180px;
        min-height: 180px;
        width: 100% !important;
        order: 1;
    }
    
    /* Remove background image on mobile – dark background only */
    .demo-text {
        background-image: none !important;
        background-color: #1a1a1a !important;
        padding-top: 10%;
        align-items: center;
        justify-content: center;
    }
    
    /* Smaller neon text on mobile so it fits */
    .text-show {
        font-size: 2.5rem;
        max-width: 90%;
        white-space: normal;
        text-align: center;
        word-break: break-word;
        line-height: 1.2;
    }
    
    /* Hide background image selector on mobile – digital mockup only */
    .background-images-container {
        display: none !important;
    }
    
    .demo-text::after {
        content: "Digital mockup only. See photos on larger screens.";
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        color: rgba(255, 255, 255, 0.5);
        white-space: normal;
        text-align: center;
        max-width: 85%;
    }
    
    /* Price preview position on mobile (compact preview) */
    .total-sel-price.price-preview {
        bottom: 28px;
        right: 10px;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* Below: scrollable settings – full width, scroll within viewport */
    .editor-container.form-wrapper {
        width: 100% !important;
        order: 2;
        max-height: calc(100vh - 220px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .editor-content-container {
        padding: 16px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-height: 0;
    }
    
    #color-table {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .font-image-container {
        grid-template-columns: repeat(2, 1fr);
        max-height: 280px;
    }
    
    .board-box-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
