/* ==============================================
   Campaign Network Landing Dock - Styles
   ============================================== */

:root {
    --dock-transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --dock-bg: rgba(0, 0, 0, 0.85);
    --dock-border: rgba(34, 197, 94, 0.3);
    --status-bg: rgba(0, 0, 0, 0.9);
    --cyan: #00ffff;
    --green: #22c55e;
}

/* ==============================================
   Hide Divi Footer when Dock is Active
   ============================================== */
.cn-landing-dock-active #main-footer,
.cn-landing-dock-active footer#main-footer,
.cn-landing-dock-active .et-l--footer,
.cn-landing-dock-active #footer-bottom,
.cn-landing-dock-active footer.et-l,
body.cn-landing-dock-active #main-footer {
    display: none !important;
}

/* Add bottom padding to page content to account for footer */
.cn-landing-dock-active .blueprints-page,
.cn-landing-dock-active #et-main-area,
.cn-landing-dock-active .page-content {
    padding-bottom: 60px !important;
}

/* Ensure dock container is at very bottom */
.cn-landing-dock-active {
    position: relative;
}

/* ==============================================
   Landing Footer (Contains Status + Dock on same line)
   ============================================== */
.cn-landing-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 8998;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--status-bg);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-family: 'Courier New', monospace;
    font-size: 11px;
    height: 36px;
    box-sizing: border-box;
}

/* Status Left */
.footer-status-left {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(0, 255, 255, 0.6);
    flex-shrink: 0;
}

.status-label {
    color: rgba(0, 255, 255, 0.8);
    font-weight: 600;
}

.status-sep {
    color: rgba(0, 255, 255, 0.3);
}

.cursor-blink {
    animation: cursorBlink 1s step-end infinite;
    color: var(--cyan);
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Status Right */
.footer-status-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.status-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(0, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.5);
    color: var(--cyan);
}

.audio-btn {
    min-width: 24px;
    padding: 4px 6px;
}

.chat-btn .chat-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==============================================
   Dock Container (Center of footer)
   ============================================== */
.cn-landing-dock {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 0;
    background: transparent;
    border: none;
    transition: all var(--dock-transition);
    flex: 1;
    max-width: 600px;
}

/* Hover state - expand icons */
.cn-landing-dock:hover {
    gap: 4px;
}

.cn-landing-dock:hover .dock-icon {
    width: 28px;
    height: 28px;
}

.cn-landing-dock:hover .dock-icon svg {
    width: 16px;
    height: 16px;
}

/* Force open state */
.cn-landing-dock.force-open {
    gap: 4px;
}

.cn-landing-dock.force-open .dock-icon {
    width: 28px;
    height: 28px;
}

.cn-landing-dock.force-open .dock-icon svg {
    width: 16px;
    height: 16px;
}

/* ==============================================
   Dock Item
   ============================================== */
.dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s ease-out;
    padding: 2px;
}

.dock-item:hover {
    transform: scale(1.3) translateY(-4px);
}

/* ==============================================
   Dock Icon
   ============================================== */
.dock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.1), rgba(255, 0, 255, 0.05));
    border: 1px solid rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all var(--dock-transition);
}

.dock-icon svg {
    width: 12px;
    height: 12px;
    stroke: var(--icon-color, #00ffff);
    filter: drop-shadow(0 0 2px var(--icon-color, #00ffff));
    transition: all 0.2s ease;
}

.dock-item:hover .dock-icon {
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.2), rgba(255, 0, 255, 0.1));
    border-color: var(--icon-color, #00ffff);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.icon-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.dock-item:hover .icon-shine {
    left: 100%;
}

/* ==============================================
   Dock Label
   ============================================== */
.dock-label {
    position: absolute;
    top: -30px;
    background: rgba(0, 0, 0, 0.95);
    color: var(--cyan);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    pointer-events: none;
    border: 1px solid rgba(0, 255, 255, 0.3);
    z-index: 10000;
}

.dock-item:hover .dock-label {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================================
   Project Switcher Panel
   ============================================== */
.cn-project-switcher {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    width: 320px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(20, 20, 30, 0.98));
    border: 1px solid rgba(0, 255, 240, 0.3);
    border-left: 3px solid rgba(0, 255, 240, 0.7);
    border-radius: 8px;
    z-index: 9000; /* Lower z-index so modals can appear above */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 0 30px rgba(0, 255, 240, 0.2),
        0 0 60px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.cn-project-switcher.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Scanline overlay */
.cn-project-switcher::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.02) 2px,
        rgba(255, 255, 255, 0.02) 4px
    );
    pointer-events: none;
    border-radius: 8px;
}

.switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 255, 240, 0.2);
}

.switcher-header h3 {
    margin: 0;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.switcher-close {
    background: transparent;
    border: none;
    color: rgba(0, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.switcher-close:hover {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.switcher-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.switcher-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(0, 255, 240, 0.15);
    border-left: 3px solid rgba(0, 255, 240, 0.4);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.switcher-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.1),
        transparent
    );
    transition: left 0.4s ease;
}

.switcher-item:hover::before {
    left: 100%;
}

.switcher-item:hover {
    background: rgba(30, 30, 45, 0.8);
    border-color: rgba(0, 255, 240, 0.4);
    border-left-color: rgba(0, 255, 240, 0.8);
    transform: translateX(4px);
    box-shadow: 
        0 0 15px rgba(0, 255, 240, 0.15),
        inset 0 0 10px rgba(0, 255, 240, 0.05);
}

.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.1), rgba(255, 0, 255, 0.05));
    border: 1px solid rgba(0, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.item-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    filter: drop-shadow(0 0 4px rgba(0, 255, 255, 0.5));
}

/* Artist item icon colors */
.switcher-item:nth-child(1) .item-icon {
    border-color: rgba(85, 255, 255, 0.4);
}

.switcher-item:nth-child(2) .item-icon {
    border-color: rgba(255, 85, 255, 0.4);
}

.switcher-item:nth-child(3) .item-icon {
    border-color: rgba(255, 255, 85, 0.4);
}

.switcher-item:nth-child(4) .item-icon {
    border-color: rgba(85, 255, 85, 0.4);
}

.switcher-item:hover .item-icon {
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.2), rgba(255, 0, 255, 0.1));
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.item-name {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

.switcher-item:hover .item-name {
    color: #fff;
}

.item-arrow {
    color: rgba(0, 255, 240, 0.5);
    font-size: 16px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.switcher-item:hover .item-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--cyan);
}

.switcher-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(0, 255, 240, 0.1);
    text-align: center;
}

.switcher-hint {
    font-size: 10px;
    color: rgba(0, 255, 255, 0.4);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* ==============================================
   Overlay for closing
   ============================================== */
.cn-switcher-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8997; /* Lower z-index so modals can appear above */
    display: none;
    pointer-events: none; /* Don't block clicks by default */
}

.cn-switcher-overlay.active {
    display: block;
    pointer-events: auto; /* Only block clicks when active */
}

/* ==============================================
   Animations
   ============================================== */
@keyframes dockItemClick {
    0% { transform: scale(1.4) translateY(-8px); }
    50% { transform: scale(1.6) translateY(-12px); }
    100% { transform: scale(1.4) translateY(-8px); }
}

.dock-item.clicked {
    animation: dockItemClick 0.3s ease;
}

/* ==============================================
   Mobile Responsive
   ============================================== */
@media (max-width: 768px) {
    .cn-landing-footer {
        padding: 0 8px;
        height: 32px;
    }
    
    .footer-status-left {
        font-size: 9px;
        gap: 4px;
    }
    
    .footer-status-left .status-sep,
    .footer-status-left .status-label:not(:first-child) {
        display: none;
    }
    
    .cn-landing-dock {
        gap: 1px;
    }
    
    .dock-icon {
        width: 18px;
        height: 18px;
    }
    
    .dock-icon svg {
        width: 10px;
        height: 10px;
    }
    
    .cn-project-switcher {
        width: calc(100% - 32px);
        bottom: 50px;
    }
    
    .footer-status-right {
        gap: 4px;
    }
    
    .status-btn span:not(.chat-dot) {
        display: none;
    }
    
    .status-btn {
        padding: 3px 5px;
    }
}

