/* ===== Constructor — Light Festive Theme ===== */

/* ---------- Layout ---------- */
.constructor-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ---------- Card ---------- */
.qcard {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.qcard-header {
    background: linear-gradient(135deg, var(--red-festive) 0%, var(--yellow-gold) 100%);
    padding: 1.2rem 1.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.qcard-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

.qcard-body {
    padding: 1.8rem;
}

/* ---------- How-it-works button ---------- */
.how-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.how-btn:hover {
    background: rgba(255, 255, 255, .35);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .25);
}

/* ---------- Progress ---------- */
.q-progress {
    margin-bottom: 1.2rem;
}

.q-progress-meta {
    font-size: .88rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.q-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 999px;
    overflow: hidden;
}

.q-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red-festive), var(--yellow-gold));
    border-radius: 999px;
    transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

.q-progress-hint {
    font-size: .82rem;
    color: var(--text-dim);
    font-weight: 600;
    margin-top: 6px;
}

/* ---------- Form Groups ---------- */
.fg {
    margin-bottom: 1.6rem;
    position: relative;
}

.fg label {
    display: block;
    font-weight: 700;
    margin-bottom: .65rem;
    color: var(--text-dark);
    font-size: 1rem;
}

/* ---------- Inputs ---------- */
.fc {
    width: 100%;
    padding: .85rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-main);
    background: var(--bg-cream);
    color: var(--text-dark);
    font-weight: 600;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.fc::placeholder {
    color: var(--text-dim);
}

.fc:focus {
    outline: none;
    border-color: var(--blue-magic);
    box-shadow: 0 0 0 3px rgba(55, 66, 250, .1);
}

select.fc {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2357606f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right .75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em;
    padding-right: 2.5rem;
}

textarea.fc {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

/* ---------- Radio / Checkbox option cards ---------- */
.opts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .7rem;
    margin-top: .5rem;
}

.opts-grid-tall .opt-label {
    min-height: 90px;
}

.opt-item {
    position: relative;
    display: flex;
}

.opt-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.opt-label {
    display: grid;
    place-content: center;
    text-align: center;
    min-height: 54px;
    padding: .8rem 1rem;
    background: var(--bg-cream);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 700;
    color: var(--text-dark);
    user-select: none;
    flex: 1;
}

.opt-label:hover {
    border-color: var(--yellow-gold);
}

.opt-input:checked+.opt-label {
    background: var(--yellow-gold);
    color: #fff;
    border-color: var(--yellow-gold);
    transform: scale(1.03);
}

.opt-hint {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-top: 2px;
}

.opt-input:checked+.opt-label .opt-hint {
    color: rgba(255, 255, 255, .8);
}

/* ---------- Validation ---------- */
.fg.has-error .fc,
.fg.has-error .opts-grid {
    border-color: var(--red-festive);
}

.err-tip {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--red-festive);
    color: #fff;
    padding: .35rem .7rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(0);
    pointer-events: none;
    z-index: 10;
}

.err-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 16px;
    border: 5px solid transparent;
    border-top-color: var(--red-festive);
}

.fg.has-error .err-tip {
    opacity: 1;
    transform: translateY(-4px);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Buttons ---------- */
.q-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .9rem 1.8rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 800;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
    text-decoration: none;
}

.q-btn-primary {
    background: var(--red-festive);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 71, 87, .3);
}

.q-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, .4);
}

.q-btn-secondary {
    background: var(--bg-cream);
    color: var(--text-dark);
    border: 2px solid var(--border-light);
}

.q-btn-secondary:hover {
    border-color: var(--yellow-gold);
    background: rgba(255, 165, 2, .05);
}

.q-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: .5rem;
}

/* ---------- Location Selector ---------- */
.loc-sel {
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.loc-sel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .8rem;
}

.loc-sel-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.loc-sel-count {
    font-size: .8rem;
    font-weight: 800;
    padding: .2rem .6rem;
    border-radius: 999px;
}

.loc-sel-count.warn {
    background: rgba(255, 71, 87, .1);
    color: var(--red-festive);
}

.loc-sel-count.ok {
    background: rgba(46, 213, 115, .1);
    color: var(--green-ok);
}

.spot-group {
    margin-bottom: .75rem;
}

.spot-group:last-child {
    margin-bottom: 0;
}

.spot-cat {
    font-size: .7rem;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 800;
    margin-bottom: .35rem;
    letter-spacing: .03em;
}

.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.mini-tag {
    padding: .4rem .75rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
    display: flex;
    align-items: center;
    gap: .3rem;
    color: var(--text-muted);
}

.mini-tag:hover {
    border-color: var(--yellow-gold);
}

.mini-tag.active {
    background: var(--yellow-gold);
    color: #fff;
    border-color: var(--yellow-gold);
}

.loc-custom {
    margin-top: .8rem;
    padding-top: .75rem;
    border-top: 1px dashed var(--border-light);
}

.chip-row {
    display: flex;
    gap: .5rem;
}

.chip-row input {
    flex: 1;
}

.chip-row button {
    width: auto;
    padding-inline: .9rem;
}

/* ---------- Custom interest chips ---------- */
.chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

.chip {
    padding: .4rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--yellow-gold);
    background: rgba(255, 165, 2, .1);
    color: var(--yellow-gold);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s ease;
}

.chip:hover {
    background: var(--red-festive);
    border-color: var(--red-festive);
    color: #fff;
}

/* ---------- Offer ---------- */
.offer-hero {
    background: linear-gradient(135deg, var(--red-festive), var(--yellow-gold));
    color: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.4rem;
}

.offer-hero h3 {
    font-size: 1.25rem;
    margin-bottom: .4rem;
    color: #fff;
}

.offer-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.offer-list li {
    display: flex;
    align-items: center;
    margin-bottom: .6rem;
    padding: .55rem .8rem;
    background: rgba(255, 165, 2, .1);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-weight: 600;
}

.offer-includes {
    background: var(--bg-cream);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--yellow-gold);
    font-size: .9rem;
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    font-weight: 600;
}

.offer-includes strong {
    color: var(--text-dark);
}

.offer-includes ul {
    margin-top: .4rem;
    padding-left: 1.2rem;
}

.offer-includes li {
    margin-bottom: .3rem;
}

/* ---------- Modals ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(47, 53, 66, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    max-width: 520px;
    width: 100%;
    margin: 0 16px;
    padding: 1.6rem 1.8rem 1.4rem;
    position: relative;
    animation: fadeInUp .25s ease-out;
}

.modal-close {
    position: absolute;
    top: .8rem;
    right: .8rem;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-dim);
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: .6rem;
    color: var(--text-dark);
}

.modal-subtitle {
    font-size: .92rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.modal-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

.modal-footer button {
    width: auto;
    padding-inline: 1.4rem;
}

.modal-tip {
    background: rgba(55, 66, 250, .06);
    border-left: 4px solid var(--blue-magic);
    padding: .75rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    margin-top: .75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: .75rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: .6rem;
    padding: .55rem .8rem;
    background: rgba(255, 165, 2, .06);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-weight: 600;
}

.feature-list li::before {
    content: '✨';
    margin-right: .7rem;
    font-size: 1.2rem;
}

/* JSON modal */
.json-box {
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    max-height: 55vh;
    overflow-y: auto;
}

.json-box pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: .85rem;
    color: var(--text-muted);
}

/* Status modal */
.status-link-box {
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    word-break: break-all;
    margin: 1rem 0;
}

.status-link {
    color: var(--blue-magic);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: .9rem;
    font-weight: 600;
}

.status-link:hover {
    text-decoration: underline;
}

/* ---------- Restore Banner ---------- */
.restore-banner {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--yellow-gold);
    color: #fff;
    padding: .45rem 0;
    text-align: center;
    font-size: .85rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(255, 165, 2, .3);
    animation: slideDown .4s cubic-bezier(.4, 0, .2, 1);
}

body.admin-bar .restore-banner {
    top: 100px;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.restore-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    padding: 0 2.5rem 0 1rem;
    position: relative;
}

.restore-link {
    background: none;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: .88rem;
    padding: .3rem .8rem;
    transition: all .2s ease;
    white-space: nowrap;
}

.restore-link:hover {
    background: rgba(255, 255, 255, .2);
}

.restore-close {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: .2rem;
}

.banner-pad {
    padding-top: 38px;
}

@media (max-width: 480px) {
    .restore-banner {
        font-size: .78rem;
        padding: .4rem 0;
    }
    .restore-inner {
        flex-direction: column;
        gap: .35rem;
        padding: .2rem 2rem .2rem .8rem;
        text-align: center;
    }
    .restore-link {
        font-size: .78rem;
        padding: .2rem .7rem;
    }
}

/* ---------- Privacy ---------- */
.privacy-note {
    font-size: .8rem;
    color: var(--text-dim);
    font-weight: 600;
    margin-top: .5rem;
}

/* ---------- Transitions ---------- */
.fade-enter-active,
.fade-leave-active {
    transition: opacity .22s ease, transform .22s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
    transform: translateY(8px);
}

/* ---------- Auth Modal ---------- */
.auth-modal {
    max-width: 400px;
    text-align: center;
}

.auth-modal h3 {
    margin-bottom: .5rem;
    font-size: 1.3rem;
    color: var(--text-dark);
}

.auth-desc {
    color: var(--text-dim);
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.auth-submit {
    width: 100%;
    margin-top: 1rem;
}

.auth-resend {
    width: 100%;
    margin-top: .5rem;
    font-size: .85rem;
}

.auth-error {
    color: var(--red-festive);
    font-size: .85rem;
    font-weight: 600;
    margin-top: .5rem;
}

.auth-mock-badge {
    background: rgba(46, 213, 115, .1);
    border: 1px solid rgba(46, 213, 115, .3);
    color: var(--green-ok);
    border-radius: 8px;
    padding: .6rem 1rem;
    margin-bottom: 1rem;
    font-size: .95rem;
    font-weight: 600;
}

.otp-input {
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: .6em;
    font-weight: 800;
}

.auth-header-btn {
    background: var(--red-festive);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .45rem 1.1rem;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.auth-header-btn:hover {
    filter: brightness(0.9);
}

.auth-user-badge {
    color: var(--text-dim);
    font-size: .85rem;
    font-weight: 600;
    padding: .45rem .6rem;
}

.qcard-header-right {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .constructor-wrap {
        padding: 24px 12px 60px;
    }

    .qcard-body {
        padding: 1.3rem;
    }

    .qcard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }

    .qcard-header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .opts-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .fc {
        font-size: .9rem;
        padding: .7rem .8rem;
    }
}