/* Ace Build-Your-Own-Server — Smart compact wizard (dark, animated). */
.ace-config-section {
    background: linear-gradient(180deg, #101216 0%, #0c0e11 100%);
    padding: 64px 0;
    color: #eef0f3;
    overflow: hidden;
}
.ace-config-head { text-align: center; margin-bottom: 34px; }
.ace-config-head .ace-eyebrow {
    display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 2px;
    text-transform: uppercase; color: #ff8f95; margin-bottom: 10px;
}
.ace-config-head h2 {
    color: #fff; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800;
    margin: 0 0 10px; letter-spacing: -.01em;
}
.ace-config-head p { color: #9aa1ab; font-size: 15px; margin: 0; }

.ace-config {
    max-width: 1120px; margin: 0 auto;
    display: grid; grid-template-columns: 250px 1fr; gap: 0;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px; overflow: hidden;
    min-height: 520px; max-height: 640px;
    box-shadow: 0 30px 70px rgba(0,0,0,.45);
}

/* --- Steps sidebar --- */
.ace-config-steps {
    margin: 0; padding: 28px 0; list-style: none;
    background: rgba(0,0,0,.28);
    border-right: 1px solid rgba(255,255,255,.07);
    display: flex; flex-direction: column; gap: 4px;
}
.ace-config-steps li {
    position: relative; display: flex; align-items: center; gap: 14px;
    padding: 16px 22px; color: #7d848e; font-weight: 700; font-size: 14px;
    cursor: default; transition: background .25s, color .25s;
    border-left: 3px solid transparent;
}
.ace-config-steps li::before {
    content: ""; position: absolute; left: 36px; top: -4px; bottom: 50%;
    width: 2px; background: rgba(255,255,255,.1);
}
.ace-config-steps li:first-child::before { display: none; }
.ace-config-steps li.is-done::before { background: #9f1722; }
.ace-step-n {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    background: rgba(255,255,255,.08); color: #b9bfc7; font-size: 13px; font-weight: 800;
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
}
.ace-config-steps li.is-active { color: #fff; background: rgba(159,23,34,.14); border-left-color: #ff5b63; }
.ace-config-steps li.is-active .ace-step-n {
    background: #9f1722; color: #fff; transform: scale(1.12);
    box-shadow: 0 0 0 5px rgba(159,23,34,.22), 0 0 18px rgba(159,23,34,.5);
}
.ace-config-steps li.is-done { color: #d7dbe0; cursor: pointer; }
.ace-config-steps li.is-done .ace-step-n { background: rgba(159,23,34,.3); color: #ffb3b8; }
.ace-config-steps li.is-done:hover { background: rgba(255,255,255,.05); }
.ace-step-t { font-size: 14px; }
.ace-step-t small { display: block; font-size: 11px; font-weight: 500; color: #7d848e; margin-top: 2px; }

/* --- Content panel --- */
.ace-config-body {
    padding: 30px 34px; overflow-y: auto; max-height: 640px;
    scrollbar-width: thin; scrollbar-color: #9f1722 transparent;
}
.ace-cfg-step { animation: aceStepIn .45s cubic-bezier(.22,.9,.3,1); }
.ace-cfg-step[hidden] { display: none; }
@keyframes aceStepIn {
    from { opacity: 0; transform: translateX(28px); }
    to { opacity: 1; transform: none; }
}
.ace-cfg-step h2 { margin: 0 0 6px; font-size: 22px; color: #fff; font-weight: 800; letter-spacing: -.01em; }
.ace-cfg-sub { margin: 0 0 20px; color: #9aa1ab; font-size: 13.5px; }
.ace-cfg-empty { color: #9aa1ab; }

/* Brands — compact animated cards */
.ace-cfg-brands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ace-cfg-brand {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 18px 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
    background: rgba(255,255,255,.04); cursor: pointer; text-align: left; color: #fff;
    transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
    animation: aceCardIn .5s cubic-bezier(.22,.9,.3,1) backwards;
}
.ace-cfg-brands .ace-cfg-brand:nth-child(2) { animation-delay: .05s; }
.ace-cfg-brands .ace-cfg-brand:nth-child(3) { animation-delay: .1s; }
.ace-cfg-brands .ace-cfg-brand:nth-child(4) { animation-delay: .15s; }
.ace-cfg-brands .ace-cfg-brand:nth-child(5) { animation-delay: .2s; }
.ace-cfg-brands .ace-cfg-brand:nth-child(6) { animation-delay: .25s; }
.ace-cfg-brands .ace-cfg-brand:nth-child(7) { animation-delay: .3s; }
.ace-cfg-brands .ace-cfg-brand:nth-child(8) { animation-delay: .35s; }
@keyframes aceCardIn {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: none; }
}
.ace-cfg-brand:hover {
    transform: translateY(-3px); border-color: rgba(159,23,34,.7);
    box-shadow: 0 12px 28px rgba(0,0,0,.4), 0 0 0 1px rgba(159,23,34,.4);
    background: rgba(159,23,34,.1);
}
.ace-cfg-brand-name { font-size: 16px; font-weight: 800; color: #fff; }
.ace-cfg-brand-count { font-size: 12px; color: #ff8f95; font-weight: 700; }

/* Models */
.ace-cfg-search {
    width: 100%; max-width: 420px; min-height: 44px; margin-bottom: 14px; padding: 0 16px;
    border: 1px solid rgba(255,255,255,.14); border-radius: 9px; font-size: 14px;
    background: rgba(0,0,0,.3); color: #fff;
}
.ace-cfg-search::placeholder { color: #7d848e; }
.ace-cfg-search:focus { outline: none; border-color: #9f1722; box-shadow: 0 0 0 3px rgba(159,23,34,.25); }
.ace-cfg-models {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    margin-bottom: 18px; max-height: 380px; overflow-y: auto; padding-right: 6px;
    scrollbar-width: thin; scrollbar-color: #9f1722 transparent;
}
.ace-cfg-model {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 14px 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
    background: rgba(255,255,255,.04); cursor: pointer; text-align: left; color: #fff;
    transition: border-color .18s, box-shadow .18s, transform .18s;
    animation: aceCardIn .4s ease backwards;
}
.ace-cfg-model:hover { border-color: rgba(159,23,34,.7); box-shadow: 0 8px 22px rgba(0,0,0,.35); transform: translateY(-2px); }
.ace-cfg-model-name { font-weight: 800; font-size: 14px; color: #fff; }
.ace-cfg-model-meta { font-size: 12px; color: #9aa1ab; }
.ace-cfg-model-note { font-size: 11.5px; color: #ff8f95; font-weight: 700; }

/* Configure form */
.ace-cfg-form {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin-bottom: 18px; padding: 20px;
    border: 1px solid rgba(255,255,255,.09); border-radius: 12px;
    background: rgba(0,0,0,.22);
}
.ace-cfg-field > label:first-child, .ace-cfg-field > label {
    display: block; font-weight: 700; font-size: 12px; margin-bottom: 7px;
    color: #d7dbe0; text-transform: uppercase; letter-spacing: .6px;
}
.ace-cfg-field select, .ace-cfg-field input[type="number"] {
    width: 100%; min-height: 42px; padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
    font-size: 13.5px; background: rgba(0,0,0,.35); color: #fff;
}
.ace-cfg-field select:focus, .ace-cfg-field input:focus { outline: none; border-color: #9f1722; }
.ace-cfg-field select option { background: #1a1d22; color: #fff; }
.ace-cfg-row2 { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: end; }
.ace-cfg-row2 > label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: #9aa1ab; }
.ace-cfg-note { color: #9aa1ab; font-size: 13px; margin: 4px 0 0; grid-column: 1 / -1; }
.ace-cfg-rm {
    width: 42px; min-height: 42px; border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.3); border-radius: 8px; font-size: 18px; cursor: pointer;
    color: #9aa1ab; align-self: end;
}
.ace-cfg-rm:hover { border-color: #9f1722; color: #ff8f95; }
.ace-cfg-add-drive { align-self: flex-start; grid-column: 1 / -1; }
.ace-cfg-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ace-check {
    display: inline-flex !important; align-items: center; gap: 8px;
    font-weight: 500 !important; font-size: 13px !important;
    color: #d7dbe0 !important; cursor: pointer;
}
.ace-check input { width: 16px; height: 16px; accent-color: #9f1722; }

/* Nav + review */
.ace-cfg-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.ace-cfg-nav .ace-button { min-height: 46px; padding-inline: 26px; font-size: 14px; }
.ace-cfg-back-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: 0 22px; border-radius: 10px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    background: rgba(255,255,255,.08); color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    transition: background .2s, border-color .2s, transform .2s;
}
.ace-cfg-back-btn:hover { background: rgba(255,255,255,.14); border-color: #ff5b63; transform: translateY(-1px); }
/* Safety: no white-on-white buttons inside the dark builder */
.ace-config .ace-button-secondary,
.ace-config-section .ace-button-secondary {
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(255,255,255,.22) !important;
    color: #fff !important;
}
.ace-config .ace-button-secondary:hover,
.ace-config-section .ace-button-secondary:hover {
    background: rgba(255,255,255,.14) !important;
    border-color: #ff5b63 !important;
    color: #fff !important;
}
/* Primary buttons inside the builder (ace-store.css isn't loaded on homepage) */
.ace-config .ace-button-primary,
.ace-config-section .ace-button-primary,
.ace-cfg-modal .ace-button-primary {
    background: #9f1722 !important;
    border: 1px solid #9f1722 !important;
    color: #fff !important;
}
.ace-config .ace-button-primary:hover,
.ace-config-section .ace-button-primary:hover,
.ace-cfg-modal .ace-button-primary:hover {
    background: #7e1119 !important;
    border-color: #7e1119 !important;
    color: #fff !important;
}

/* Quote request modal */
.ace-cfg-modal { position: fixed; inset: 0; z-index: 99990; display: flex; align-items: center; justify-content: center; padding: 18px; }
.ace-cfg-modal[hidden] { display: none; }
.ace-cfg-modal-backdrop { position: absolute; inset: 0; background: rgba(5,6,8,.72); backdrop-filter: blur(4px); animation: aceFadeIn .25s ease; }
.ace-cfg-modal-box {
    position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
    background: #171a20; border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
    padding: 34px 32px 30px; color: #eef0f3;
    box-shadow: 0 40px 100px rgba(0,0,0,.6);
    animation: aceModalIn .35s cubic-bezier(.22,.9,.3,1.1);
}
@keyframes aceFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes aceModalIn { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
.ace-cfg-modal-close {
    position: absolute; top: 14px; right: 16px; width: 36px; height: 36px;
    border-radius: 50%; border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.06); color: #fff; font-size: 20px; cursor: pointer; line-height: 1;
}
.ace-cfg-modal-close:hover { border-color: #ff5b63; color: #ff8f95; }
.ace-cfg-modal-pill {
    display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
    color: #ff8f95; background: rgba(159,23,34,.18); border: 1px solid rgba(159,23,34,.45);
    padding: 6px 13px; border-radius: 999px; margin: 0 0 12px;
}
.ace-cfg-modal-box h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: #fff; }
.ace-cfg-modal-sub { margin: 0 0 20px; font-size: 13.5px; color: #9aa1ab; }
.ace-cfg-mfield { display: block; margin-bottom: 13px; }
.ace-cfg-mfield > span { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: #b9bfc7; margin-bottom: 7px; }
.ace-cfg-mfield input, .ace-cfg-mfield textarea {
    width: 100%; min-height: 44px; padding: 10px 14px; font-size: 14px;
    background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.14);
    border-radius: 9px; color: #fff; font-family: inherit;
}
.ace-cfg-mfield textarea { resize: vertical; }
.ace-cfg-mfield input:focus, .ace-cfg-mfield textarea:focus { outline: none; border-color: #9f1722; box-shadow: 0 0 0 3px rgba(159,23,34,.25); }
.ace-cfg-mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ace-cfg-merror { color: #ff9aa0; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.ace-cfg-merror[hidden] { display: none; }
.ace-cfg-msubmit { width: 100%; min-height: 50px; font-size: 15px; margin-top: 4px; }
.ace-cfg-msubmit:disabled { opacity: .6; cursor: wait; }

/* Thank-you confirmation */
.ace-cfg-thanks { text-align: center; padding: 44px 36px 36px; }
.ace-cfg-thanks-icon {
    width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
    background: #9f1722; color: #fff; font-size: 34px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 10px rgba(159,23,34,.15), 0 12px 30px rgba(159,23,34,.4);
    animation: acePopIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes acePopIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ace-cfg-thanks h3 { font-size: 26px; margin: 0 0 8px; }
.ace-cfg-thanks-msg { font-size: 15px; color: #d7dbe0; margin: 0 0 8px; font-weight: 600; }
.ace-cfg-thanks-sub { font-size: 13.5px; color: #9aa1ab; margin: 0 0 24px; }
.ace-cfg-thanks .ace-button { min-width: 160px; min-height: 48px; }
.ace-cfg-table {
    width: 100%; border-collapse: collapse; background: rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.09); border-radius: 12px; overflow: hidden; margin-bottom: 18px;
}
.ace-cfg-table th, .ace-cfg-table td {
    padding: 11px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 13.5px; vertical-align: top; color: #eef0f3;
}
.ace-cfg-table tr:last-child th, .ace-cfg-table tr:last-child td { border-bottom: 0; }
.ace-cfg-table th {
    width: 160px; color: #9aa1ab; font-size: 11px; text-transform: uppercase;
    letter-spacing: .8px; background: rgba(0,0,0,.3);
}
.ace-cfg-done {
    margin-top: 14px; padding: 14px 18px; border-radius: 10px;
    background: rgba(28,122,52,.15); border: 1px solid rgba(63,185,90,.4);
    font-weight: 600; color: #d7dbe0; font-size: 14px;
}
.ace-cfg-done a { color: #7ee2a0; font-weight: 800; }
.ace-cfg-back { align-self: flex-start; }

/* Responsive */
@media (max-width: 900px) {
    .ace-config { grid-template-columns: 1fr; max-height: none; }
    .ace-config-steps {
        flex-direction: row; overflow-x: auto; padding: 14px;
        border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07);
    }
    .ace-config-steps li { border-left: 0; border-bottom: 3px solid transparent; padding: 10px 14px; white-space: nowrap; }
    .ace-config-steps li::before { display: none; }
    .ace-config-steps li.is-active { border-bottom-color: #ff5b63; }
    .ace-step-t small { display: none; }
    .ace-cfg-brands { grid-template-columns: repeat(2, 1fr); }
    .ace-cfg-models { grid-template-columns: 1fr; }
    .ace-cfg-form { grid-template-columns: 1fr; }
    .ace-config-body { padding: 22px 18px; max-height: none; }
}
