/* ChatX Cloud - Live Preview & Dashboards Integration */

.cx-preview-section {
    position: relative;
    padding: 60px 0 80px;
    z-index: 10;
}

.cx-preview-heading {
    text-align: center;
    margin-bottom: 28px;
}

.cx-preview-heading .chatx-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 9999px;
    color: var(--primary, #00f0ff);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.cx-preview-heading h2 {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: var(--text-primary, #f3f4f6);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.cx-preview-heading p {
    color: var(--text-secondary, #9ca3af);
    font-size: 1rem;
    max-width: 680px;
    margin: 0 auto;
}

/* ==========================================================================
   Reference Style Capsule Tab Bar
   ========================================================================== */
.cx-preview-tabs-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 0 28px 0;
    padding: 0 1rem;
}

.cx-preview-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    box-shadow: none;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.cx-preview-tabs::-webkit-scrollbar {
    display: none;
}

.cx-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9999px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 500;
    user-select: none;
}

.cx-tab-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cx-tab-btn strong {
    color: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1;
}

.cx-tab-btn:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.04);
}

.cx-tab-btn:hover svg {
    opacity: 1;
}

/* Reference image active state: dark inset button with soft border and subtle glow */
.cx-tab-btn.is-active {
    background: #090a0d;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cx-tab-btn.is-active svg {
    opacity: 1;
    stroke: #ffffff;
}

.cx-tab-btn.is-active strong {
    color: #ffffff;
    font-weight: 600;
}

/* Optional active accent badge for selected tabs (e.g. coral/red line accent) */
.cx-tab-btn.is-active[data-role="installation"] svg {
    stroke: #f43f5e;
}

.cx-tab-btn.is-active[data-role="inbox"] svg {
    stroke: #00f0ff;
}

/* ==========================================================================
   Hero Rotating Channel Ticker (Image 1 Style)
   ========================================================================== */
.chatx-hero-title {
    font-size: 4rem;
    line-height: 1.15;
    margin-top: 1rem;
    margin-bottom: 2rem;
    max-width: 1050px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.chatx-hero-channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    vertical-align: middle;
    margin: 0 8px;
    position: relative;
}

.chatx-hero-channel-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.4);
    padding: 10px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.chatx-hero-channel-icon-wrap img,
.chatx-hero-channel-icon-wrap svg {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.chatx-hero-channel-text {
    background: linear-gradient(135deg, #00f0ff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Channels Hub Header */
.channels-hub-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.channels-hub-heading h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.channels-hub-heading p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Board.Support Feature Showcase Sections
   ========================================================================== */
.chatx-bs-feature-list {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    margin-top: 3.5rem;
}

.chatx-bs-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    align-items: center;
}

.chatx-bs-feature-row.invert-layout {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 968px) {

    .chatx-bs-feature-row,
    .chatx-bs-feature-row.invert-layout {
        grid-template-columns: 1fr !important;
        gap: 2.5rem;
    }
}

.chatx-bs-copy-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.chatx-feat-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(0, 240, 255, 0.12);
    color: var(--primary, #00f0ff);
    border: 1px solid rgba(0, 240, 255, 0.3);
    margin-bottom: 1rem;
}

.chatx-bs-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 2rem !important;
    letter-spacing: -0.02em;
}

.chatx-bs-desc {
    font-size: 1.05rem;
    color: var(--text-secondary, #9ca3af);
    line-height: 1.65;
    margin-bottom: 1.75rem;
}

.chatx-bs-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 20px;
    width: 100%;
}

.chatx-bs-bullets li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #e5e7eb;
    font-weight: 500;
}

.chatx-bs-bullets li svg {
    width: 18px;
    height: 18px;
    color: var(--primary, #00f0ff);
    flex-shrink: 0;
}

.chatx-bs-img-col {
    width: 100%;
}

.chatx-bs-card-media {
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.chatx-bs-card-media:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 240, 255, 0.35);
}

.chatx-bs-card-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Browser Frame */
.cx-preview-window {
    border: 1px solid rgba(27, 35, 54, 0.9);
    border-radius: 18px;
    background: #080c14;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(0, 240, 255, 0.08);
    overflow: hidden;
    max-width: 1280px;
    margin: 0 auto;
}

.cx-preview-browser-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(12, 15, 23, 0.9);
    border-bottom: 1px solid rgba(27, 35, 54, 0.9);
}

.cx-browser-dots {
    display: flex;
    gap: 6px;
}

.cx-browser-dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.cx-browser-dots i:nth-child(1) {
    background: #ff5f56;
}

.cx-browser-dots i:nth-child(2) {
    background: #ffbd2e;
}

.cx-browser-dots i:nth-child(3) {
    background: #27c93f;
}

.cx-browser-address {
    flex: 1;
    max-width: 580px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid rgba(27, 35, 54, 0.9);
    border-radius: 20px;
    background: rgba(5, 7, 12, 0.7);
    font-size: 12px;
}

.cx-browser-lock {
    font-size: 11px;
}

.cx-browser-url {
    flex: 1;
    color: #9ca3af;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cx-browser-badge {
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 240, 255, 0.15);
    color: var(--primary, #00f0ff);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.cx-browser-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cx-preview-reload-btn {
    background: none;
    border: 1px solid rgba(27, 35, 54, 0.9);
    color: #9ca3af;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 15px;
    display: grid;
    place-items: center;
    transition: all 0.2s;
}

.cx-preview-reload-btn:hover {
    border-color: var(--primary, #00f0ff);
    color: var(--primary, #00f0ff);
}

.cx-preview-ext-btn {
    padding: 5px 12px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary, #00f0ff);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.cx-preview-ext-btn:hover {
    background: var(--primary, #00f0ff);
    color: #05070c;
}

.cx-preview-iframe-wrapper {
    position: relative;
    width: 100%;
    height: 720px;
    background: #05070c;
}

.cx-preview-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.cx-iframe-loader {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 12, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
    transition: opacity 0.3s ease;
    color: #9ca3af;
    font-size: 13px;
}

.cx-iframe-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.cx-loader-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary, #00f0ff);
    border-radius: 50%;
    animation: cx-spin 0.8s linear infinite;
}

@keyframes cx-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Channels Hub Grid Upgrade (Scoped so it does not affect cx-hero-logos-grid) */
.chatx-logos-grid:not(.cx-hero-logos-grid) {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 16px !important;
    padding: 24px 0 !important;
}

.chatx-logos-grid:not(.cx-hero-logos-grid) .chatx-logo-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 18px 12px !important;
    background: rgba(12, 15, 23, 0.6) !important;
    border: 1px solid rgba(27, 35, 54, 0.8) !important;
    border-radius: 14px !important;
    color: var(--text-secondary, #9ca3af) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    transition: all 0.25s ease !important;
}

.chatx-logos-grid:not(.cx-hero-logos-grid) .chatx-logo-item img,
.chatx-logos-grid:not(.cx-hero-logos-grid) .chatx-logo-item svg {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
}

.chatx-logos-grid:not(.cx-hero-logos-grid) .chatx-logo-item:hover {
    background: rgba(18, 23, 36, 0.95) !important;
    border-color: rgba(0, 240, 255, 0.4) !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

/* Checkout slide-over panel */
.cx-checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cx-checkout-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cx-checkout-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 520px;
    max-width: 100vw;
    background: #0c0f17;
    border-left: 1px solid #1b2336;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cx-checkout-sidebar.is-open {
    transform: translateX(0);
}

.cx-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid #1b2336;
    background: #080b12;
}

.cx-checkout-header h3 {
    margin: 0;
    color: #f3f4f6;
    font-size: 1.1rem;
    font-weight: 700;
}

.cx-checkout-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.cx-checkout-close:hover {
    color: #ffffff;
}

.cx-checkout-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.cx-checkout-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

.cx-checkout-loader {
    position: absolute;
    inset: 0;
    background: #0c0f17;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 13px;
    z-index: 5;
    transition: opacity 0.2s ease;
}

.cx-checkout-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .cx-preview-iframe-wrapper {
        height: 520px;
    }

    .cx-browser-address {
        display: none;
    }

    .cx-tab-btn {
        flex: 1 1 auto;
        justify-content: center;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}
/* ==========================================================================
   Billing Period Toggle (Monthly / Yearly)
   ========================================================================== */
.cx-billing-toggle {
    display: inline-flex;
    align-items: center;
    background: #0c0f17;
    border: 1px solid #1b2336;
    border-radius: 9999px;
    padding: 4px;
    gap: 4px;
    margin: 0 auto 2.5rem auto;
}

.cx-billing-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1.4rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.cx-billing-btn.is-active {
    background: #1b2336;
    color: #f3f4f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.cx-billing-save-badge {
    background: linear-gradient(135deg, #00f0ff, #7c3aed);
    color: #000;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

/* Price switching animation */
.cx-plan-price-val {
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.cx-plan-price-val.is-switching {
    opacity: 0;
    transform: translateY(-4px);
}

.cx-plan-period {
    font-size: 0.9rem;
    font-weight: 400;
    color: #6b7280;
    margin-left: 2px;
}

/* Yearly strikethrough original price */
.cx-plan-original-price {
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: line-through;
    margin-right: 4px;
    display: none;
}

/* Hero channel ticker — text-only, gradient */
.chatx-hero-channel-badge {
    display: inline-block;
    position: relative;
}

.chatx-hero-channel-text {
    display: inline-block;
    background: linear-gradient(90deg, #00f0ff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.chatx-hero-channel-text.is-fading {
    opacity: 0;
    transform: translateY(-6px);
}

/* Channel hub heading centered */
.channels-hub-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

.channels-hub-heading h2 {
    font-size: 2.25rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin: 0.5rem 0;
}
