/* echo.css v4 */

.echo-wrapper {
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
    background: #09090b;
    position: relative;
}

.echo-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* TOP BAR LAYOUT */
.echo-topbar {
    height: 44px;
    background: #09090b;
    border-bottom: 1px solid #3f3f46;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
}

/* 1. The Widget Button "Rectangle" */
.widgets-toggle-btn {
    height: 28px;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    padding: 0 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    transition: 0.2s;
    white-space: nowrap;
}
.widgets-toggle-btn:hover {
    border-color: #52525b;
    background: #3f3f46;
}
.widgets-toggle-btn span {
    font-size: 14px; 
    color: #3b82f6; /* Blue Plus */
}

.vert-sep { width: 1px; height: 20px; background: #27272a; }

/* 2. Tabs Area */
.layout-tabs-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.layout-tabs { 
    display: flex; gap: 4px; overflow-x: auto; 
    /* Hide scrollbar */
    scrollbar-width: none; -ms-overflow-style: none;
}
.layout-tabs::-webkit-scrollbar { display: none; }

.layout-tab {
    padding: 6px 12px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    color: #71717a;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap;
}
.layout-tab:hover { color: #f4f4f5; background: rgba(255,255,255,0.05); }
.layout-tab.active { background: #18181b; color: #3b82f6; border-color: #3f3f46; }

/* 3. New Board Button */
.new-layout-btn {
    background: transparent; border: 1px dashed #3f3f46;
    color: #a1a1aa; padding: 6px 10px; border-radius: 4px;
    font-size: 10px; cursor: pointer; white-space: nowrap;
}
.new-layout-btn:hover { border-color: #a1a1aa; color: #fff; }


/* SIDEBAR (Drawer) */
.echo-sidebar {
    position: absolute; top: 60px; left: 0; bottom: 0;
    width: 260px;
    background: rgba(24, 24, 27, 0.95); backdrop-filter: blur(10px);
    border-right: 1px solid #3f3f46;
    z-index: 2000; /* Above widgets */
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
.echo-sidebar.active { transform: translateX(0); }
.sb-head { padding: 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #3f3f46; font-size: 11px; font-weight: 800; text-transform: uppercase; color: #a1a1aa; letter-spacing: 1px; }
.close-sb-btn { background: transparent; border: none; color: #52525b; font-size: 18px; cursor: pointer; }
.sb-grid { padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sb-item { background: rgba(255,255,255,0.03); border: 1px solid #3f3f46; border-radius: 8px; height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: 0.2s; }
.sb-item svg { width: 24px; height: 24px; fill: #a1a1aa; }
.sb-item span { font-size: 11px; color: #a1a1aa; font-weight: 500; }
.sb-item:hover { background: rgba(59, 130, 246, 0.1); border-color: #3b82f6; }
.sb-item:hover svg { fill: #3b82f6; }
.sb-item:hover span { color: #fff; }

/* CANVAS & WIDGETS */
.echo-canvas {
    flex: 1; 
    position: relative; /* CRITICAL for absolute children */
    overflow: hidden; 
    background-image: radial-gradient(#27272a 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: #09090b;
    width: 100%;
    height: 100%;
}

.echo-widget { position: absolute; background: #18181b; border: 1px solid #3f3f46; border-radius: 6px; display: flex; flex-direction: column; box-shadow: 0 4px 20px rgba(0,0,0,0.5); user-select: none; }
.echo-widget.is-dragging { opacity: 0.9; z-index: 9999 !important; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.3); }
.ew-header { height: 32px; background: #27272a; border-bottom: 1px solid #3f3f46; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; cursor: grab; }
.ew-header:active { cursor: grabbing; }
.ew-title { font-size: 11px; font-weight: 700; color: #a1a1aa; text-transform: uppercase; }
.ew-controls button { background: transparent; border: none; color: #52525b; cursor: pointer; font-size: 16px; padding: 0 4px; }
.ew-controls button:hover { color: #ef4444; }
.ew-body { flex: 1; overflow: hidden; position: relative; background: #18181b; }
.ew-resize { width: 20px; height: 20px; position: absolute; bottom: 0; right: 0; cursor: se-resize; background: linear-gradient(135deg, transparent 50%, #52525b 50%); opacity: 0.3; border-radius: 0 0 6px 0; z-index:10; }
.ew-resize:hover { opacity: 1; background: linear-gradient(135deg, transparent 50%, #3b82f6 50%); }









/* --- SEARCH MODAL STYLES --- */
.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #27272a;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sr-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sr-sym {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #e4e4e7; /* Zinc-200 */
    font-size: 14px;
}

.sr-exch {
    font-size: 10px;
    font-weight: 600;
    color: #71717a; /* Zinc-500 */
    background: #18181b; /* Zinc-900 */
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sr-name {
    font-size: 13px;
    color: #a1a1aa; /* Zinc-400 */
    text-align: right;
    max-width: 50%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading/Empty States */
.searching, .empty-search {
    padding: 30px;
    text-align: center;
    color: #52525b;
    font-size: 13px;
    font-style: italic;
}


/* Add to echo.css */

/* When dragging, disable pointer events on all iframes */
body.is-dragging-active iframe {
    pointer-events: none;
}