/* AI Crypto Bot - Frontend Styles */

.aicb-chart-wrapper {
    width: 100%; 
    min-height: 500px; 
    position: relative; /* CRITICAL for marker bounds */
    z-index: 1; /* Establishes local stacking context to prevent WP theme overlap */
    background: #131722 !important; 
    border: 1px solid #2a2e39 !important; 
    border-radius: 8px; 
    padding: 15px; 
    box-sizing: border-box;
    color: #d1d4dc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.aicb-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px !important; /* Expanded to 40px for more breathing room */
    background: transparent !important; 
    padding: 0 !important;
    border: none !important;
}

.aicb-controls select {
    padding: 8px 12px;
    border-radius: 4px;
    background: #1e222d !important;
    border: 1px solid #2a2e39 !important;
    color: #d1d4dc !important;
    flex: 1 1 120px;
    max-width: 100%;
    outline: none;
    cursor: pointer;
    box-shadow: none !important;
}

.aicb-controls select:focus {
    border-color: #2962ff !important;
}

#aicb-timeframes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 2 1 200px;
    background: transparent !important;
}

#aicb-timeframes button {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    background: #1e222d !important;
    color: #d1d4dc !important;
    border: 1px solid #2a2e39 !important;
    border-radius: 4px;
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: none !important;
    font-weight: normal !important;
}

#aicb-timeframes button:hover {
    background: #2a2e39 !important;
}

#aicb-timeframes button.active-tf {
    background: #2962ff !important;
    color: #ffffff !important;
    border-color: #2962ff !important;
}

#aicb-loading-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 10; 
    font-weight: normal; 
    background: rgba(19, 23, 34, 0.85) !important;
    color: #b2b5be !important;
    border-radius: 8px;
}

.apexcharts-tooltip, 
.apexcharts-xaxistooltip, 
.apexcharts-yaxistooltip {
    background: #1e222d !important;
    border: 1px solid #2a2e39 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4) !important;
}
.apexcharts-xaxistooltip-bottom:before, 
.apexcharts-yaxistooltip-left:before {
    border-bottom-color: #2a2e39 !important;
    border-left-color: #2a2e39 !important;
}
.apexcharts-xaxistooltip-bottom:after, 
.apexcharts-yaxistooltip-left:after {
    border-bottom-color: #1e222d !important;
    border-left-color: #1e222d !important;
}

/* Chart Navigation Controls */
.aicb-chart-nav-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px !important; /* Expanded to 40px for more breathing room */
    padding: 10px;
    background: #1e222d;
    border-radius: 6px;
    border: 1px solid #2a2e39;
}

.aicb-chart-nav-controls button {
    background: #2a2e39 !important;
    color: #d1d4dc !important;
    border: 1px solid #434651 !important;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    user-select: none;
}

.aicb-chart-nav-controls button:hover {
    background: #2962ff !important;
    color: #fff !important;
    border-color: #2962ff !important;
}

/* Edge Markers for Off-Screen Elements */
.aicb-edge-marker {
    position: absolute;
    z-index: 10; 
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.6);
    pointer-events: none; 
    right: 25px; 
    white-space: nowrap;
    letter-spacing: 0.5px;
    font-family: monospace;
}
.aicb-edge-tp {
    background: rgba(0, 227, 150, 0.95);
    border: 1px solid #00E396;
}
.aicb-edge-sl {
    background: rgba(255, 69, 96, 0.95);
    border: 1px solid #FF4560;
}
.aicb-edge-entry-buy {
    background: rgba(41, 98, 255, 0.95);
    border: 1px solid #2962ff;
}
.aicb-edge-entry-sell {
    background: rgba(239, 83, 80, 0.95);
    border: 1px solid #ef5350;
}

/* Feed Styles */
.aicb-feed-wrapper {
    background: #131722;
    border: 1px solid #2a2e39;
    border-radius: 8px;
    padding: 20px;
    color: #d1d4dc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 20px 0;
    box-sizing: border-box;
}
.aicb-feed-title {
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #2a2e39;
    padding-bottom: 15px;
}
.aicb-feed-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.aicb-feed-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #2a2e39;
}
.aicb-feed-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.aicb-feed-icon {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 18px;
    text-align: center;
    min-width: 45px;
    letter-spacing: 0.5px;
}
.aicb-sig-buy {
    background: rgba(41, 98, 255, 0.15);
    color: #2962ff;
    border: 1px solid rgba(41, 98, 255, 0.5);
}
.aicb-sig-sell {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
    border: 1px solid rgba(239, 83, 80, 0.5);
}
.aicb-feed-content {
    font-size: 15px;
    line-height: 1.5;
    color: #b2b5be;
}
.aicb-feed-content strong {
    color: #d1d4dc;
}
.aicb-feed-empty {
    text-align: center;
    padding: 30px;
    color: #787b86;
    font-style: italic;
    font-size: 15px;
    background: #1e222d;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .aicb-chart-wrapper {
        padding: 10px !important;
    }
    .aicb-chart-nav-controls {
        gap: 8px;
        padding: 8px;
    }
    .aicb-chart-nav-controls button {
        padding: 10px;
        flex: 1;
    }
    .aicb-edge-marker {
        right: 20px; /* Aligned tight with mobile 10px wall padding */
    }
    .aicb-feed-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .aicb-feed-icon {
        margin-bottom: 10px;
    }
}