
/**

 * NeuraWeb dApp Shell Styles

 * Styles for immersive dApp experience (EchoStream, NexusFlowNow, etc.)

 * Uses CSS variables from shell.css and appearance.css for theme consistency

 */



/* ==========================================================================

   DAPP SHELL LAYOUT OVERRIDES

   ========================================================================== */



.dapp-shell-mode {

    /* Remove sidebar spacing */

    --sidebar-width: 0;

}



.dapp-shell-mode .footer-bar,

.dapp-shell-mode .status-bar {

    position: relative !important;

    bottom: auto !important;

    left: auto !important;

    right: auto !important;

    width: 100% !important;

    margin-left: 0 !important;

}



.dapp-shell-content {

    min-height: calc(100vh - 90px); /* Alert bar + UNE bar + dApp bar */

    display: flex;

    flex-direction: column;

}



.dapp-content-area {

    flex: 1;

    overflow: visible;

}



/* ==========================================================================

   DAPP BAR

   ========================================================================== */



.dapp-bar {

    height: 50px;

    background: var(--bg-secondary, #1e293b);

    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 16px;

    position: sticky;

    top: 0;

    z-index: 1000;

}



.dapp-bar-left,

.dapp-bar-center,

.dapp-bar-right {

    display: flex;

    align-items: center;

    gap: 12px;

}



.dapp-bar-left {

    flex: 1;

}



.dapp-bar-center {

    flex: 0 0 auto;

}



.dapp-bar-right {

    flex: 1;

    justify-content: flex-end;

}



/* Back/Logo */

.dapp-bar-logo {

    width: 36px;

    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    color: var(--text-secondary, #9ca3af);

    text-decoration: none;

    transition: all 0.2s ease;

}



.dapp-bar-logo:hover {

    background: var(--bg-tertiary, rgba(255,255,255,0.1));

    color: var(--text-primary, #f9fafb);

}



.dapp-bar-title {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 1rem;

    font-weight: 600;

    color: var(--text-primary, #f9fafb);

}



.dapp-bar-title i {

    font-size: 1.125rem;

}



/* ==========================================================================

   SKIN SWITCHER

   ========================================================================== */



.skin-switcher {

    position: relative;

}



.skin-switcher-trigger {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 8px 16px;

    background: var(--bg-tertiary, rgba(255,255,255,0.1));

    border: 1px solid var(--border-color, rgba(255,255,255,0.1));

    border-radius: 20px;

    color: var(--text-primary, #f9fafb);

    font-size: 0.875rem;

    font-weight: 500;

    cursor: pointer;

    transition: all 0.2s ease;

}



.skin-switcher-trigger:hover {

    background: var(--bg-elevated, rgba(255,255,255,0.15));

    border-color: var(--primary, #10b981);

}



.skin-dot {

    width: 10px;

    height: 10px;

    border-radius: 50%;

    flex-shrink: 0;

}



.skin-name {

    max-width: 120px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}



.skin-switcher-trigger .fa-chevron-down {

    font-size: 0.625rem;

    color: var(--text-secondary, #9ca3af);

    transition: transform 0.2s ease;

}



.skin-switcher-dropdown.active + .skin-switcher-trigger .fa-chevron-down,

.skin-switcher:has(.skin-switcher-dropdown.active) .fa-chevron-down {

    transform: rotate(180deg);

}



/* Dropdown */

.skin-switcher-dropdown {

    position: absolute;

    top: calc(100% + 8px);

    left: 50%;

    transform: translateX(-50%);

    min-width: 220px;

    background: var(--bg-secondary, #1e293b);

    border: 1px solid var(--border-color, rgba(255,255,255,0.1));

    border-radius: 12px;

    box-shadow: 0 10px 40px rgba(0,0,0,0.4);

    opacity: 0;

    visibility: hidden;

    transition: all 0.2s ease;

    z-index: 200;

}



.skin-switcher-dropdown.active {

    opacity: 1;

    visibility: visible;

}



.skin-dropdown-header {

    padding: 12px 16px;

    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 0.8125rem;

    font-weight: 600;

    color: var(--text-secondary, #9ca3af);

    text-transform: uppercase;

    letter-spacing: 0.5px;

}



.skin-dropdown-header i {

    color: var(--primary, #10b981);

}



.skin-dropdown-list {

    padding: 8px;

    max-height: 320px;

    overflow-y: visible;

}



.skin-option {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    border-radius: 8px;

    color: var(--text-primary, #f9fafb);

    text-decoration: none;

    font-size: 0.875rem;

    transition: all 0.15s ease;

}



.skin-option:hover {

    background: var(--bg-tertiary, rgba(255,255,255,0.1));

}



.skin-option.active {

    background: rgba(var(--primary-rgb, 16, 185, 129), 0.15);

}



.skin-option .fa-check {

    margin-left: auto;

    color: var(--primary, #10b981);

    font-size: 0.75rem;

}



.skin-option .fab,

.skin-option .fas {

    width: 20px;

    text-align: center;

    font-size: 0.875rem;

    color: var(--text-secondary, #9ca3af);

}



/* ==========================================================================

   POINTS DISPLAY

   ========================================================================== */



.dapp-bar-points {

    display: flex;

    align-items: center;

    gap: 6px;

    padding: 6px 12px;

    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(245, 158, 11, 0.2));

    border: 1px solid rgba(234, 179, 8, 0.3);

    border-radius: 16px;

    font-size: 0.875rem;

    font-weight: 600;

    color: #fbbf24;

}



.dapp-bar-points i {

    font-size: 0.75rem;

}



/* ==========================================================================

   USER MENU

   ========================================================================== */



.dapp-bar-user {

    position: relative;

}



.dapp-bar-user-btn {

    width: 36px;

    height: 36px;

    border-radius: 50%;

    background: var(--primary, #10b981);

    border: none;

    color: white;

    font-size: 0.8125rem;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;

}



.dapp-bar-user-btn:hover {

    transform: scale(1.05);

    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 16, 185, 129), 0.3);

}



.dapp-bar-user-menu {

    position: absolute;

    top: calc(100% + 8px);

    right: 0;

    min-width: 180px;

    background: var(--bg-secondary, #1e293b);

    border: 1px solid var(--border-color, rgba(255,255,255,0.1));

    border-radius: 12px;

    box-shadow: 0 10px 40px rgba(0,0,0,0.4);

    opacity: 0;

    visibility: hidden;

    transition: all 0.2s ease;

    z-index: 200;

    padding: 8px;

}



.dapp-bar-user-menu.active {

    opacity: 1;

    visibility: visible;

}



.dapp-bar-user-menu a {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    border-radius: 8px;

    color: var(--text-primary, #f9fafb);

    text-decoration: none;

    font-size: 0.875rem;

    transition: all 0.15s ease;

}



.dapp-bar-user-menu a:hover {

    background: var(--bg-tertiary, rgba(255,255,255,0.1));

}



.dapp-bar-user-menu a i {

    width: 16px;

    text-align: center;

    color: var(--text-secondary, #9ca3af);

}



.dapp-bar-user-menu hr {

    border: none;

    border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));

    margin: 8px 0;

}



/* Login Button (when not logged in) */

.dapp-bar-login {

    padding: 8px 16px;

    background: var(--primary, #10b981);

    border-radius: 8px;

    color: white;

    text-decoration: none;

    font-size: 0.875rem;

    font-weight: 500;

    transition: all 0.2s ease;

}



.dapp-bar-login:hover {

    background: var(--primary-hover, #059669);

}



/* ==========================================================================

   CLOSE BUTTON

   ========================================================================== */



.dapp-bar-close {

    width: 36px;

    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    color: var(--text-secondary, #9ca3af);

    text-decoration: none;

    font-size: 1.125rem;

    transition: all 0.2s ease;

}



.dapp-bar-close:hover {

    background: rgba(239, 68, 68, 0.2);

    color: #ef4444;

}



/* ==========================================================================

   RESPONSIVE

   ========================================================================== */



@media (max-width: 768px) {

    .dapp-bar {

        padding: 0 12px;

    }

    

    .dapp-bar-title span {

        display: none;

    }

    

    .skin-name {

        display: none;

    }

    

    .skin-switcher-trigger {

        padding: 8px 12px;

    }

    

    .dapp-bar-points span {

        display: none;

    }

    

    .dapp-bar-points {

        padding: 8px;

        border-radius: 50%;

    }

}



@media (max-width: 480px) {

    .dapp-bar-logo {

        display: none;

    }

    

    .skin-switcher-dropdown {

        left: auto;

        right: -60px;

        transform: none;

    }

}



/* ==========================================================================

   LIGHT THEME OVERRIDES

   ========================================================================== */



[data-theme="light"] .dapp-bar {

    background: var(--bg-secondary, #f1f5f9);

    border-bottom-color: var(--border-color, rgba(0,0,0,0.1));

}



[data-theme="light"] .skin-switcher-trigger {

    background: var(--bg-tertiary, rgba(0,0,0,0.05));

    border-color: var(--border-color, rgba(0,0,0,0.1));

}



[data-theme="light"] .skin-switcher-dropdown,

[data-theme="light"] .dapp-bar-user-menu {

    background: var(--bg-primary, #ffffff);

    border-color: var(--border-color, rgba(0,0,0,0.1));

    box-shadow: 0 10px 40px rgba(0,0,0,0.15);

}



[data-theme="light"] .dapp-bar-close:hover {

    background: rgba(239, 68, 68, 0.1);

}




/* ==========================================================================

   DAPP SHELL - UNE Bar Sticky (not fixed)

   This lets content flow naturally below it

   ========================================================================== */







/* ==========================================================================

   UNIVERSAL SKIN SWITCHER

   ========================================================================== */



.skin-switcher {

    position: relative;

}



.skin-switcher-btn {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 8px 16px;

    background: var(--bg-secondary);

    border: 1px solid var(--border-color);

    border-radius: 20px;

    color: var(--text-primary);

    cursor: pointer;

    font-size: 0.875rem;

    transition: all 0.2s;

}



.skin-switcher-btn:hover {

    background: var(--bg-card);

    border-color: var(--text-muted);

}



.skin-switcher-btn .fa-chevron-down {

    font-size: 0.625rem;

    transition: transform 0.2s;

}



.skin-switcher.active .skin-switcher-btn .fa-chevron-down {

    transform: rotate(180deg);

}



.skin-switcher-dropdown {

    position: absolute;

    top: calc(100% + 8px);

    right: 0;

    width: 220px;

    background: var(--bg-card);

    border: 1px solid var(--border-color);

    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(0,0,0,0.3);

    z-index: 1000;

    opacity: 0;

    visibility: hidden;

    transform: translateY(-10px);

    transition: all 0.2s;

}



.skin-switcher.active .skin-switcher-dropdown {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

}



.skin-switcher-header {

    padding: 12px 16px;

    font-size: 0.6875rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    color: var(--text-muted);

    border-bottom: 1px solid var(--border-color);

}



.skin-switcher-option {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px 16px;

    color: var(--text-primary);

    text-decoration: none;

    transition: background 0.2s;

}



.skin-switcher-option:hover {

    background: var(--bg-secondary);

}



.skin-switcher-option.active {

    background: var(--bg-secondary);

}



.skin-switcher-option .fa-check {

    margin-left: auto;

    color: var(--primary);

    font-size: 0.75rem;

}



.skin-switcher-dot {

    width: 12px;

    height: 12px;

    border-radius: 50%;

    flex-shrink: 0;

}



.skin-switcher-name {

    max-width: 120px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}



@media (max-width: 768px) {

    .skin-switcher-name {

        display: none;

    }

}




/* ==========================================================================

   UNIVERSAL SKIN SWITCHER

   ========================================================================== */



.skin-switcher {

    position: relative;

}



.skin-switcher-btn {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 8px 16px;

    background: var(--bg-secondary);

    border: 1px solid var(--border-color);

    border-radius: 20px;

    color: var(--text-primary);

    cursor: pointer;

    font-size: 0.875rem;

    transition: all 0.2s;

}



.skin-switcher-btn:hover {

    background: var(--bg-card);

    border-color: var(--text-muted);

}



.skin-switcher-btn .fa-chevron-down {

    font-size: 0.625rem;

    transition: transform 0.2s;

}



.skin-switcher.active .skin-switcher-btn .fa-chevron-down {

    transform: rotate(180deg);

}



.skin-switcher-dropdown {

    position: absolute;

    top: calc(100% + 8px);

    right: 0;

    width: 220px;

    background: var(--bg-card);

    border: 1px solid var(--border-color);

    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(0,0,0,0.3);

    z-index: 1000;

    opacity: 0;

    visibility: hidden;

    transform: translateY(-10px);

    transition: all 0.2s;

}



.skin-switcher.active .skin-switcher-dropdown {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

}



.skin-switcher-header {

    padding: 12px 16px;

    font-size: 0.6875rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    color: var(--text-muted);

    border-bottom: 1px solid var(--border-color);

}



.skin-switcher-option {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px 16px;

    color: var(--text-primary);

    text-decoration: none;

    transition: background 0.2s;

}



.skin-switcher-option:hover {

    background: var(--bg-secondary);

}



.skin-switcher-option.active {

    background: var(--bg-secondary);

}



.skin-switcher-option .fa-check {

    margin-left: auto;

    color: var(--primary);

    font-size: 0.75rem;

}



.skin-switcher-dot {

    width: 12px;

    height: 12px;

    border-radius: 50%;

    flex-shrink: 0;

}



.skin-switcher-name {

    max-width: 120px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}



@media (max-width: 768px) {

    .skin-switcher-name {

        display: none;

    }

}




/* ==========================================================================

   DAPP SHELL - Fixed header bars

   ========================================================================== */



.dapp-shell-mode .alert-bar {

    position: fixed !important;

    top: 0 !important;

    left: 0;

    right: 0;

    z-index: 600;

}



.dapp-shell-mode .une-bar {

    position: fixed !important;

    top: var(--nw-topbar-height) !important;

    left: 0;

    right: 0;

    z-index: 500;

}



.dapp-shell-mode .dapp-shell-content {

    margin-top: 88px;

}



/* When alert is closed */

body.alert-hidden.dapp-shell-mode .une-bar {

    top: 0 !important;

}



body.alert-hidden.dapp-shell-mode .dapp-shell-content {

    margin-top: 56px;

}






/* EchoStream header */

.dapp-shell-mode .nw-header {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}



body.alert-hidden.dapp-shell-mode .nw-header {

    top: 56px !important;

}



/* NexusFlowNow dApp bar */

.dapp-shell-mode .nfn-dapp-bar {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}



body.alert-hidden.dapp-shell-mode .nfn-dapp-bar {

    top: 56px !important;

}



/* Content needs extra margin for dApp bar (56px) */

.dapp-shell-mode .dapp-shell-content {

    margin-top: 152px !important; /* alert (32px) + UNE (56px) + dApp bar (56px) */

}



body.alert-hidden.dapp-shell-mode .dapp-shell-content {

    margin-top: 112px !important; /* UNE (56px) + dApp bar (56px) */

}






/* EchoStream - Audio Wave */

.dapp-shell-mode .aw-header {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}

body.alert-hidden.dapp-shell-mode .aw-header {

    top: 56px !important;

}



/* EchoStream - Cinema Mode */

.dapp-shell-mode .cm-header {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}

body.alert-hidden.dapp-shell-mode .cm-header {

    top: 56px !important;

}



/* EchoStream - Classic Video */

.dapp-shell-mode .yt-header {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}

body.alert-hidden.dapp-shell-mode .yt-header {

    top: 56px !important;

}



/* EchoStream - Freedom View */

.dapp-shell-mode .fv-header {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}

body.alert-hidden.dapp-shell-mode .fv-header {

    top: 56px !important;

}



/* EchoStream - Live Focus */

.dapp-shell-mode .lf-header {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}

body.alert-hidden.dapp-shell-mode .lf-header {

    top: 56px !important;

}



/* EchoStream - Patron Mode */

.dapp-shell-mode .pm-header {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}

body.alert-hidden.dapp-shell-mode .pm-header {

    top: 56px !important;

}



/* EchoStream - Visual Feed */

.dapp-shell-mode .vf-header {

    position: fixed !important;

    top: 96px !important;

    left: 0;

    right: 0;

    z-index: 400;

}

body.alert-hidden.dapp-shell-mode .vf-header {

    top: 56px !important;

}



