/* 
 * Frontend CSS for Custom Neon Sign Plugin (Dark Modular Theme)
 */

:root {
    /* Color Palette */
    --neon-bg-primary: #14151a;
    /* Main background of the configurator */
    --neon-bg-secondary: #1c1d24;
    /* Card backgrounds */
    --neon-text-primary: #ffffff;
    /* Main text color */
    --neon-text-secondary: #8b8d98;
    /* Subtext and labels */
    --neon-accent: #3b82f6;
    /* Accent color for selected items */
    --neon-border: #2d2e36;
    /* Standard border color */
    --neon-border-hover: #4b4c56;
    /* Hovered border color */
    --neon-glow: rgba(59, 130, 246, 0.4);
    /* Accent glow */
}

/* Base Configurator Container */
#neon-configurator-wrapper {
    background-color: var(--neon-bg-primary);
    color: var(--neon-text-primary);
    padding: 24px;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid var(--neon-border);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Steps and Typography */
.neon-step-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--neon-text-primary);
    margin: 0 0 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.neon-step-subtitle {
    font-size: 0.75rem;
    color: var(--neon-text-secondary);
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

/* Input Styles */
.neon-textarea {
    width: 100%;
    background-color: var(--neon-bg-secondary);
    color: var(--neon-text-primary);
    border: 1px solid var(--neon-border);
    border-radius: 8px;
    padding: 16px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 32px;
}

.neon-textarea:focus {
    outline: none;
    border-color: var(--neon-accent);
    box-shadow: 0 0 0 2px var(--neon-glow);
}

.neon-textarea::placeholder {
    color: var(--neon-text-secondary);
}

/* Grid Layouts for Cards */
.neon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

#neon_font_selector_grid {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px;
}

#neon_font_selector_grid::-webkit-scrollbar {
    width: 6px;
}

#neon_font_selector_grid::-webkit-scrollbar-track {
    background: var(--neon-bg-secondary);
    border-radius: 4px;
}

#neon_font_selector_grid::-webkit-scrollbar-thumb {
    background: var(--neon-border-hover);
    border-radius: 4px;
}

/* Card Styles (Fonts, Sizes, Backings) */
.neon-card {
    background-color: var(--neon-bg-secondary);
    border: 2px solid var(--neon-border);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.neon-card:hover {
    border-color: var(--neon-border-hover);
    background-color: #24252e;
}

.neon-card.selected {
    border-color: var(--neon-accent);
    background-color: rgba(59, 130, 246, 0.1);
}

/* Specific Font Card Tweaks */
.neon-card .font-name {
    font-size: 1.25rem;
    color: var(--neon-text-primary);
    margin-bottom: 8px;
}

.neon-card .font-style-label {
    font-size: 0.75rem;
    color: var(--neon-text-secondary);
}

/* Specific Size Card Tweaks */
.neon-card .size-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--neon-text-primary);
    margin-bottom: 4px;
}

.neon-card.selected .size-name {
    color: var(--neon-accent);
}

.neon-card .size-desc {
    font-size: 0.8rem;
    color: var(--neon-text-secondary);
}

/* Color Swatches */
.neon-color-selector {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.neon-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.neon-color-swatch:hover {
    transform: scale(1.1);
}

.neon-color-swatch.selected {
    border: 2px solid var(--neon-text-primary);
    transform: scale(1.15);
}

/* The selected item needs a variable outer glow based on its inner color */
.neon-color-swatch.selected::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    /* We use inline styles or DOM script to set the shadow color matching the swatch */
    z-index: -1;
    opacity: 0.7;
}

/* Generic Radio hiding (since Cards wrap them) */
.neon-hidden-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Price Display Area */
.neon-price-container {
    background-color: var(--neon-bg-secondary);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--neon-accent);
    margin-top: 16px;
}

.neon-price-container span:first-child {
    font-size: 1.1rem;
    color: var(--neon-text-primary);
    font-weight: bold;
}

#neon_live_price {
    font-size: 1.5rem;
    color: var(--neon-accent);
    font-weight: bold;
}

/* Backing specific layout (if reusing grid or flex) */
.neon-backing-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.neon-backing-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--neon-text-primary);
    font-size: 0.95rem;
}

.neon-backing-option input[type="radio"] {
    accent-color: var(--neon-accent);
    width: 18px;
    height: 18px;
}


/* Custom Range Slider Styling */
.neon-controls input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin: 15px 0;
}

.neon-controls input[type="range"]:focus {
    outline: none;
}

.neon-controls input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: var(--neon-border);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.neon-controls input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: var(--neon-border);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.neon-controls input[type="range"]::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--neon-accent);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
    box-shadow: 0 0 10px var(--neon-glow);
    border: 2px solid var(--neon-text-primary);
    transition: transform 0.1s ease;
}

.neon-controls input[type="range"]::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--neon-accent);
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-glow);
    border: 2px solid var(--neon-text-primary);
    transition: transform 0.1s ease;
}

.neon-controls input[type="range"]::-webkit-slider-thumb:hover,
.neon-controls input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.neon-controls input[type="range"]::-moz-range-thumb:hover,
.neon-controls input[type="range"]::-moz-range-thumb:active {
    transform: scale(1.15);
}

/* Base & Soporte Flexible Row Styles */
.neon-flex-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
    transition: background 0.2s ease;
    cursor: pointer;
}

.neon-flex-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.neon-flex-option-radio {
    display: flex;
    align-items: center;
    gap: 12px;
}

.neon-flex-option-radio input[type="radio"] {
    accent-color: var(--neon-accent);
    width: 18px;
    height: 18px;
    margin: 0;
}

.neon-option-name {
    font-size: 0.95rem;
    color: var(--neon-text-primary);
}

.neon-option-icon {
    max-height: 40px;
    max-width: 80px;
    object-fit: contain;
    border-radius: 4px;
    background-color: transparent;
}