/* ==========================================================================
   Version Switcher — tabs, sidebar card, browse cross-links
   Designed for DashboardPack theme (dark hero area, light content areas)
   ========================================================================== */

/* --- Hero Version Tabs (inside dark hero-wrapper) --- */

.version-tabs-wrapper {
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.version-tabs {
    display: inline-flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    margin: 0 auto;
}

.version-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.version-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.version-tab-active {
    background: var(--tab-color, #4680ff);
    color: #fff;
    font-weight: 600;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.version-tab-active:hover {
    background: var(--tab-color, #4680ff);
    color: #fff;
}

.version-tab-disabled {
    opacity: 0.4;
    cursor: default;
}

.version-tab-disabled:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
}

.version-tab-badge-soon {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    background: rgba(234, 179, 8, 0.25);
    color: #fbbf24;
}

/* SVG icons inside tabs */
.version-tab svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.version-tab-active svg {
    opacity: 1;
}

/* Tech badges below tabs (still in hero area — must be readable on dark bg) */
.version-tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 0 0;
    justify-content: center;
}

/* Override parent's text-align left to ensure centering works */
.hero-wrapper .theme-description-single .version-tabs-wrapper {
    text-align: center;
}

.hero-wrapper .theme-description-single .version-tabs-wrapper .version-tech-badges {
    justify-content: center;
}

.version-tech-badge {
    display: inline-block;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    letter-spacing: 0.01em;
}

/* --- Sidebar "Also Available In" Card (light context, near pricing) --- */

.version-sidebar-card {
    border: 2px solid var(--bs-primary, #4680ff);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    background: #fff;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.version-sidebar-header {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #212529;
}

.version-sidebar-header i {
    color: var(--bs-primary, #4680ff);
    font-size: 18px;
}

.version-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.version-sidebar-item:hover {
    border-color: var(--bs-primary, #4680ff);
    background: rgba(70, 128, 255, 0.04);
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(70, 128, 255, 0.1);
}

.version-sidebar-item:last-child {
    margin-bottom: 0;
}

.version-sidebar-item-disabled {
    opacity: 0.55;
    cursor: default;
    background: #f8f9fa;
}

.version-sidebar-item-disabled:hover {
    border-color: #e9ecef;
    background: #f8f9fa;
    transform: none;
    box-shadow: none;
}

.version-sidebar-item-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #f0f2f5;
    border: 1px solid #e9ecef;
}

.version-sidebar-item-disabled .version-sidebar-item-logo {
    opacity: 0.5;
}

.version-sidebar-item-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.version-sidebar-item-name {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #212529;
    text-align: left;
}

.version-sidebar-item-tech {
    font-size: 12px;
    color: #6c757d;
    margin-top: 1px;
    text-align: left;
}

.version-sidebar-item-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    margin-left: auto;
    flex-shrink: 0;
}

.version-sidebar-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
}

.version-sidebar-item-link {
    font-size: 12px;
    color: var(--bs-primary, #4680ff);
    font-weight: 600;
}

.version-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Browse Card Cross-Links --- */

.version-crosslinks {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 10px;
    padding-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.version-crosslinks-label {
    color: #6c757d;
    font-weight: 500;
}

.version-crosslink {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    transition: opacity 0.15s, transform 0.15s;
}

.version-crosslink:hover {
    text-decoration: none;
    color: #fff;
    opacity: 0.85;
    transform: translateY(-1px);
}

.version-crosslink svg {
    flex-shrink: 0;
}

.version-crosslink-disabled {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f0f2f5;
    border: 1px dashed #ccc;
}

.version-crosslink-disabled svg {
    flex-shrink: 0;
    opacity: 0.4;
}

/* --- Browse Card Group Badge --- */

.version-group-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 16;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    background: rgba(70, 128, 255, 0.9);
    color: #fff;
    box-shadow: 0 2px 6px rgba(70, 128, 255, 0.3);
    letter-spacing: 0.01em;
}

/* --- Framework Badge (bottom-left of image on browse page) --- */

.version-framework-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 16;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    border-radius: 6px;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.version-framework-badge svg {
    flex-shrink: 0;
}

/* Cross-links sit below the image wrapper now, inside .theme-box */
.theme-box > .version-crosslinks {
    padding: 8px 10px 0;
}

/* --- Responsive: Tablets and below (< 992px) --- */

@media (max-width: 991.98px) {
    /* Fix the tiny 60% image — make it full width on mobile */
    .theme-b-md .theme-box {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Remove image wrapper padding so it goes edge-to-edge */
    .hero-wrapper .hero-wrapper-single .theme-box .theme-img-wrapper {
        padding: 0;
        border-radius: 8px;
        box-shadow: none;
    }

    .hero-wrapper .hero-wrapper-single .theme-box .theme-img-wrapper .theme-img img {
        border-radius: 8px;
    }

    /* Version tabs: scroll if too many */
    .version-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .version-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Sidebar card full width on tablet */
    .version-sidebar-card {
        max-width: 100%;
    }

    /* Pricing cards spacing */
    .pricing-details-box .col-lg-4 {
        margin-bottom: 16px;
    }
}

/* --- Responsive: Phones (< 576px) --- */

@media (max-width: 575.98px) {
    .version-tab {
        padding: 6px 14px;
        font-size: 12px;
    }

    .version-tab svg {
        width: 14px;
        height: 14px;
    }

    .version-tech-badges {
        gap: 4px;
    }

    .version-tech-badge {
        padding: 3px 10px;
        font-size: 10px;
    }

    /* Sidebar card items stack on small phones */
    .version-sidebar-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .version-sidebar-item-right {
        text-align: left;
        align-items: flex-start;
        margin-left: 54px; /* align with text after logo */
    }

    /* Hero text sizing */
    .hero-wrapper .theme-description-single h1 {
        font-size: 1.5rem;
    }

    /* Browse card cross-links wrap */
    .version-crosslinks {
        flex-wrap: wrap;
    }
}
