/* ==========================================================================
   Neo Store — Neon Sign Designer
   Redesigned UI: Text / Font / Color shown as three peer panels at once
   (no tabs, no wizard steps) so users can jump between them freely.
   Color system is checked against WCAG contrast ratios — see the values
   below, all pairs are >= 4.5:1 for body text, >= 3:1 for large text/UI.
   ========================================================================== */

:root {
    --bg: #0f1115;          /* page background */
    --panel: #1a1d27;       /* card background */
    --panel-alt: #22262f;   /* input / nested surface */
    --border: #333a4d;      /* visible border, ~1.5:1 vs panel (structural, not text) */
    --text: #f4f6fb;        /* primary text — 17.5:1 on --bg */
    --text-muted: #a7afc4;  /* secondary text — 7.4:1 on --panel */
    --accent: #22d3ee;      /* cyan — primary interactive color, 10.5:1 on --bg */
    --accent-ink: #04222a;  /* text color to use ON TOP of --accent */
    --accent-2: #ff5f7a;    /* pink — used only for the final call-to-action */
    --accent-2-ink: #2a0006;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", -apple-system, Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.colorlib-loader,
#header-top,
#header-bottom {
    display: none !important;
}

/* style3d41.css sets #page { overflow-x: hidden; height: 100% } for its
   off-canvas mobile menu, which we don't use (nav is hidden above). Any
   ancestor with overflow other than visible disables position:sticky on
   descendants — this is what breaks the sticky preview column. */
#page {
    overflow: visible;
    height: auto;
}

#main-content {
    padding: 0;
}

.box-content {
    max-width: 1360px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-3) 72px;
}

.neon-slogan {
    font-size: 28px !important;
    color: var(--text) !important;
    text-shadow: 0 0 18px rgba(244,246,251,.35);
    margin: 0 0 var(--space-3);
}

/* ==========================================================================
   Top-level layout: preview column + controls column (controls hold the
   three peer panels stacked). Only the direct child .row of .box-content
   gets flex treatment — nested .row elements (inside #neon-step-1) must
   stay normal block flow, otherwise Bootstrap's float-based columns and
   our flex rules fight each other and the whole layout breaks.
   ========================================================================== */
.box-content > .row {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
}

#neon-step-1,
.col-md-8.col-sm-8.col-lg-8.col-xs-12#design {
    width: 100%;
    float: none;
    padding: 0;
}

#neon-step-1 .row {
    margin: 0;
}

@media (min-width: 1100px) {
    .box-content > .row {
        flex-direction: row;
        /* Fallback layout if preview-pin.js hasn't run yet (or JS is
           disabled): #design still visually matches the controls column's
           height instead of collapsing to #neon's own (much shorter) box. */
        align-items: stretch;
    }
    /* Preview gets the majority of the width; controls narrow to a fixed
       column. Font/Color grids fall back to fewer columns (see below) to
       still fit without letting the controls column get too cramped. */
    #neon-step-1 {
        width: 380px;
        flex: 0 0 380px;
    }
    #design {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* ==========================================================================
   Controls: three peer panels (Text / Font / Color), always visible,
   stacked vertically. The old nav-tabs bar is hidden — no step order.
   ========================================================================== */
#neontab {
    display: none !important;
}

#neontabContent {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

#neontabContent .tab-pane {
    display: block !important;
    opacity: 1 !important;
    position: static !important;
}

#neontabContent .tab-pane,
.size_style {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
}

/* Panel headers reuse the original <p> labels already in the markup
   ("Chọn font", "Chọn màu sắc") instead of synthesizing new ones with
   ::before — avoids showing two near-duplicate headings stacked together. */
.panel-heading,
#fontt > div > p,
#colorr > div > p:first-child {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent) !important;
    margin: 0 0 var(--space-2);
    text-align: left !important;
}

/* ---- Text step ---- */
#editor textarea {
    width: 100%;
    min-height: 100px;
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    padding: 14px 16px;
    font-size: 16px;
    resize: vertical;
}

#editor textarea::placeholder {
    color: var(--text-muted);
}

#editor textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34,211,238,.22);
}

/* ---- Font step ---- */
#fontt ul,
#colorr ul {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-1);
    max-height: 260px;
    overflow-y: auto;
    padding: 0 2px 0 0;
    margin: 0;
}

@media (min-width: 1100px) {
    #fontt ul,
    #colorr ul {
        grid-template-columns: repeat(3, 1fr);
        max-height: 260px;
    }
}

#fontt ul li,
#colorr ul li {
    width: auto !important;
    height: auto !important;
    float: none !important;
    padding: 0 !important;
}

.font-action {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    overflow: hidden;
}

.font-action span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 6px;
    color: var(--text);
}

.font-action.current {
    border-color: var(--accent);
    background: rgba(34,211,238,.12);
    box-shadow: 0 0 0 1px var(--accent) inset;
}

/* ---- Color step ---- */
.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 4px;
    height: auto;
}

.btn-action i {
    font-size: 18px;
}

.btn-action span {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.btn-action.current {
    border-color: var(--accent);
    background: rgba(34,211,238,.12);
    box-shadow: 0 0 0 1px var(--accent) inset;
}

.btn-action.current span {
    color: var(--text);
}

/* Hidden, not removed: art-design.js reads $('.img-color-current').attr('src')
   when submitting the quote form (colorLink field), so the <img> must stay
   in the DOM even though the preview swatch itself isn't useful UI (it only
   ever has one real image, themes/default/colors/deep-blue.jpg — every other
   color links to a 403/404 placeholder, see repo cleanup notes). */
.color-img {
    display: none;
}

/* ---- Font size slider — lives inside the #fontt panel, right under the
   font grid, since both control how the neon text looks. ---- */
.font-size {
    font-weight: 600;
    color: var(--text);
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
}

.font-size #fontsize {
    color: var(--accent);
}

input[type="range"]#fader {
    width: 100%;
    margin-top: 10px;
    accent-color: var(--accent);
}

.size_note {
    color: var(--text-muted) !important;
    font-size: 12px;
    display: block;
    margin-top: 6px;
}

.size_style {
    margin-top: 0;
}

.size_style label {
    color: var(--text-muted) !important;
}

.option-label {
    color: var(--text-muted) !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

#size_table {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
    padding: 0;
    margin-top: var(--space-1);
}

.size-box,
div.size-box {
    flex: 1 1 calc(50% - 8px);
    width: auto;
    margin: 0 !important;
    background: var(--panel-alt) !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px !important;
    color: var(--text);
    position: relative;
}

.size-box.active,
div.size-box.active {
    border-color: var(--accent) !important;
    background: var(--panel-alt) !important;
}

.size-box.active::after,
div.size-box.active::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 8px;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

.size-box .s_size2 div {
    color: var(--text) !important;
}

#locationGr {
    display: flex;
    gap: var(--space-1);
    margin-top: var(--space-2);
}

#locationGr .col-xs-6 {
    width: 50%;
    padding: 0 4px;
}

.custom-radio label,
.custom-radio .custom-control-label {
    background: var(--panel-alt) !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text) !important;
    font-weight: 600;
    font-size: 13px;
}

.custom-radio.selected label,
.custom-radio:hover label {
    border-color: var(--accent) !important;
    background: var(--panel-alt) !important;
    color: var(--accent) !important;
}

/* ==========================================================================
   Preview column
   ========================================================================== */
#neon {
    overflow: hidden;
    padding: 0;
    border-radius: var(--radius-lg);
    background: #05060a;
    box-shadow: 0 30px 60px -24px rgba(0,0,0,.6);
}

@media (min-width: 1100px) {
    /* Sticky (not fixed): fixed was tried but ignores document flow, so it
       overlapped the logo at the top of the page and the footer at the
       bottom. Sticky respects #neon's natural position, only pinning it
       while its containing block (#design, stretched to match the
       controls column's height) has room — it drifts slightly in the
       final stretch of scroll once the footer comes into view, which is
       an acceptable trade-off since there's nothing left to compare the
       preview against at that point. */
    #neon {
        position: sticky;
        top: var(--space-3);
    }
}

#lenon-slide {
    height: calc(100vh - 4 * var(--space-3));
    min-height: 380px;
    max-height: 640px;
    border-radius: var(--radius-lg);
    background-color: #05060a;
}

.neon {
    font-size: 56px;
}

.flipster__item img {
    height: 84px;
    width: 84px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255,255,255,.18);
}

.flipster__item.flipster__item--current img {
    border-color: var(--accent);
}

.two_btn {
    margin-top: var(--space-3);
}

#form-sent-quote {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
}

#form-sent-quote p {
    color: var(--text-muted) !important;
    font-size: 13px;
}

#form-sent-quote label {
    color: var(--text) !important;
    font-weight: 600;
    font-size: 13px;
}

#form-sent-quote .form-control {
    background: var(--panel-alt);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
}

#form-sent-quote .form-control::placeholder {
    color: var(--text-muted);
}

#form-sent-quote .form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34,211,238,.22);
}

#submitQuote {
    display: inline-block;
    background: var(--accent-2);
    color: var(--accent-2-ink);
    font-weight: 700;
    border-radius: 999px;
    padding: 12px 28px;
    border: 0;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

#submitQuote:hover {
    background: #ff7d93;
    transform: translateY(-1px);
}

/* ==========================================================================
   Footer — neutralize legacy bootstrap float columns, fix contrast.
   ========================================================================== */
#menu-footer-link {
    display: none;
}

footer#colorlib-footer {
    background: var(--panel);
    border-top: 1px solid var(--border);
    color: var(--text-muted) !important;
    margin-top: var(--space-4);
    padding-top: 40px;
}

footer#colorlib-footer .colorlib-widget {
    float: none;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

footer#colorlib-footer h4 {
    color: var(--text) !important;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

footer#colorlib-footer p,
footer#colorlib-footer .copy p {
    color: var(--text-muted) !important;
    font-size: 13px;
    line-height: 1.6;
}

footer#colorlib-footer .copy {
    margin-top: 24px;
}

footer#colorlib-footer a {
    color: var(--text-muted);
}

/* ==========================================================================
   Thin, unobtrusive scrollbars for the internally-scrolling controls
   column and the font/color grids — keeps the page from growing tall
   while still surfacing every option.
   ========================================================================== */
#neon-step-1,
#fontt ul,
#colorr ul {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

#neon-step-1::-webkit-scrollbar,
#fontt ul::-webkit-scrollbar,
#colorr ul::-webkit-scrollbar {
    width: 6px;
}

#neon-step-1::-webkit-scrollbar-thumb,
#fontt ul::-webkit-scrollbar-thumb,
#colorr ul::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}
