/* Header Upload 3D Models CTA — always show cloud icon (Craftcloud-style) */
.headers .ht .r .compare.btn .bi-cloud-arrow-up,
a.compare-btn .bi-cloud-arrow-up {
    display: inline-block !important;
    position: static !important;
    left: auto !important;
    padding-right: 0 !important;
    font-size: 1.05em;
    line-height: 1;
    flex-shrink: 0;
}

.headers .ht .r .compare.btn,
a.compare-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    white-space: nowrap;
}

a.compare-btn {
    background: #e94560;
    color: #fff;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    flex: 1;
    margin-right: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.35);
}

a.compare-btn:hover {
    color: #fff;
    background: #c73650;
    text-decoration: none;
}

@media (max-width: 480px) {
    a.compare-btn {
        flex: none;
        max-width: none;
        padding: 6px 10px;
        font-size: 12px;
    }

    a.compare-btn .compare-label {
        max-width: 9.5em;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Onboarding tour overlay */
.aihfabs-onboarding-tour {
    position: fixed;
    inset: 0;
    z-index: 10060;
    pointer-events: none;
}

.aihfabs-onboarding-tour.is-active {
    pointer-events: auto;
}

.aihfabs-onboarding-tour__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.aihfabs-onboarding-tour.is-active .aihfabs-onboarding-tour__backdrop {
    opacity: 1;
}

.aihfabs-onboarding-tour__spotlight {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
    transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
    pointer-events: none;
    z-index: 1;
    display: none;
}

.aihfabs-onboarding-tour.is-active .aihfabs-onboarding-tour__spotlight {
    display: block;
}

.aihfabs-onboarding-tour__spotlight::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 2px solid #e94560;
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.25);
}

.aihfabs-onboarding-tour__panel {
    position: absolute;
    z-index: 2;
    width: min(380px, calc(100vw - 32px));
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
    padding: 18px 18px 16px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, top 0.25s ease, left 0.25s ease;
}

.aihfabs-onboarding-tour.is-active .aihfabs-onboarding-tour__panel {
    opacity: 1;
    transform: translateY(0);
}

.aihfabs-onboarding-tour__panel.is-centered {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.aihfabs-onboarding-tour.is-active .aihfabs-onboarding-tour__panel.is-centered {
    transform: translate(-50%, -50%) !important;
}

.aihfabs-onboarding-tour.is-closing .aihfabs-onboarding-tour__backdrop,
.aihfabs-onboarding-tour.is-closing .aihfabs-onboarding-tour__panel,
.aihfabs-onboarding-tour.is-closing .aihfabs-onboarding-tour__spotlight {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: none !important;
}

.aihfabs-onboarding-tour.is-closing .aihfabs-onboarding-tour__spotlight {
    display: none !important;
}

.aihfabs-onboarding-tour__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.aihfabs-onboarding-tour__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

.aihfabs-onboarding-tour__close {
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.aihfabs-onboarding-tour__close:hover {
    color: #111827;
}

.aihfabs-onboarding-tour__steps {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.aihfabs-onboarding-tour__step-dot {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #e5e7eb;
}

.aihfabs-onboarding-tour__step-dot.is-active,
.aihfabs-onboarding-tour__step-dot.is-done {
    background: #e94560;
}

.aihfabs-onboarding-tour__step-title {
    margin: 0 0 6px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #e94560;
}

.aihfabs-onboarding-tour__step-desc {
    margin: 0 0 14px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #4b5563;
}

.aihfabs-onboarding-tour__missing {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: #6b7280;
}

.aihfabs-onboarding-tour__missing a {
    color: #e94560;
    font-weight: 600;
}

.aihfabs-onboarding-tour__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.aihfabs-onboarding-tour__actions-left,
.aihfabs-onboarding-tour__actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aihfabs-onboarding-tour__btn {
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    line-height: 1.2;
}

.aihfabs-onboarding-tour__btn--ghost {
    background: transparent;
    color: #6b7280;
}

.aihfabs-onboarding-tour__btn--ghost:hover {
    color: #111827;
}

.aihfabs-onboarding-tour__btn--secondary {
    background: #f3f4f6;
    color: #374151;
}

.aihfabs-onboarding-tour__btn--secondary:hover {
    background: #e5e7eb;
}

.aihfabs-onboarding-tour__btn--primary {
    background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35);
}

.aihfabs-onboarding-tour__btn--primary:hover {
    background: linear-gradient(135deg, #c73650 0%, #e94560 100%);
}

.aihfabs-onboarding-tour-target-pulse {
    animation: aihfabsTourPulse 1.6s ease-in-out infinite;
}

@keyframes aihfabsTourPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.35); }
    50% { box-shadow: 0 0 0 8px rgba(233, 69, 96, 0); }
}

body.aihfabs-onboarding-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .aihfabs-onboarding-tour__panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        overflow: auto;
    }
}
