/* Trading Ideas Page Styles */

.trading-ideas-main {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    height: calc(100vh - var(--header-height, 60px));
    overflow: hidden;
    background: var(--bg-primary);
    position: relative;
}

/* Sidebar Toggle Button (Hidden on Desktop) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: calc(var(--header-height, 60px) + 1rem);
    left: 1rem;
    z-index: 901;
    padding: 0.75rem 1rem;
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease, background 0.2s ease;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
}

.sidebar-toggle.hidden {
    opacity: 0;
    pointer-events: none;
}

.sidebar-toggle:hover {
    background: var(--primary-color-dark, #0056b3);
}

.sidebar-toggle:active {
    background: #004085;
}

.sidebar-toggle-icon {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: white;
    position: relative;
}

.sidebar-toggle-icon::before,
.sidebar-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.sidebar-toggle-icon::before {
    top: -6px;
}

.sidebar-toggle-icon::after {
    top: 6px;
}

/* Sidebar Overlay (Hidden on Desktop) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height, 60px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 899;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* Trading Ideas Sidebar */
.trading-ideas-sidebar {
    height: 100%;
    overflow-y: auto;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-content {
    padding: 1.5rem;
}

.trading-ideas-panel {
    height: 100%;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.panel-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ideas-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.ideas-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.idea-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.idea-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.idea-item.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.idea-item.active .idea-timeframe {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.idea-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.idea-item.active .idea-name {
    color: white;
}

.idea-timeframe {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Right Panel - Idea Details */
.idea-details-panel {
    padding: 2rem;
    background: var(--bg-primary);
    overflow-y: auto;
    height: 100%;
}

.idea-details-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Placeholder */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    text-align: center;
    color: var(--text-secondary);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.placeholder-content p {
    margin: 0;
    font-size: 1rem;
}

/* Idea Details */
.idea-header {
    margin-bottom: 2rem;
}

.idea-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.idea-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.idea-category {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.idea-timeframe-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.idea-section {
    margin-bottom: 2rem;
}

.idea-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.idea-section-icon {
    font-size: 1.5rem;
}

.idea-signal-code {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.idea-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.idea-description p {
    margin: 0 0 1rem 0;
}

.idea-description ul,
.idea-description ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.idea-description li {
    margin-bottom: 0.5rem;
}

.idea-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.idea-description code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .trading-ideas-main {
        grid-template-columns: 1fr;
    }
    
    /* Show sidebar toggle button */
    .sidebar-toggle {
        display: flex;
    }
    
    /* Show sidebar overlay when active */
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        pointer-events: auto;
    }
    
    /* Transform sidebar into sliding panel */
    .trading-ideas-sidebar {
        position: fixed;
        top: var(--header-height, 60px);
        left: 0;
        bottom: 0;
        width: 320px;
        max-width: 85vw;
        z-index: 900;
        transform: translateX(-100%);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }
    
    .trading-ideas-sidebar.active {
        transform: translateX(0);
    }
    
    /* Show close button in sidebar header */
    .sidebar-close {
        display: flex;
    }
    
    .sidebar-header {
        padding: 1.5rem;
    }
    
    .sidebar-content {
        padding: 1rem 1.5rem;
    }
    
    /* Adjust main content */
    .idea-details-panel {
        padding: 5rem 1.5rem 1.5rem;
        min-height: calc(100vh - var(--header-height, 60px));
    }
}

@media (max-width: 768px) {
    .sidebar-toggle {
        top: calc(var(--header-height, 60px) + 0.75rem);
        left: 0.75rem;
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .trading-ideas-sidebar {
        width: 280px;
    }
    
    .idea-details-panel {
        padding: 4.5rem 1rem 1rem;
    }
    
    .panel-title {
        font-size: 1.25rem;
    }
    
    .idea-title {
        font-size: 1.5rem;
    }
    
    .idea-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .sidebar-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .sidebar-toggle-text {
        display: none;
    }
    
    .sidebar-toggle {
        padding: 0.625rem;
        width: 44px;
        height: 44px;
        justify-content: center;
    }
}
