/* ============================================
   CHART OVERLAYS STYLES
   ICT Analyzer Pro V29.5
============================================ */

/* Alert Lines on Chart */
.chart-alert-line {
    position: absolute;
    left: 0;
    right: 80px;
    height: 1px;
    background: var(--sell-red);
    z-index: 15;
    pointer-events: none;
}

.chart-alert-line::before {
    content: attr(data-price);
    position: absolute;
    right: -75px;
    top: -10px;
    background: var(--sell-red);
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.7rem;
}

.chart-alert-line.with-bell::after {
    content: '\f0f3';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 8px;
    top: -8px;
    color: var(--sell-red);
    font-size: 0.8rem;
}

/* Position Lines on Chart */
.chart-position-line {
    position: absolute;
    left: 0;
    right: 60px;
    height: 2px;
    cursor: ns-resize;
    z-index: 100;
    display: flex;
    align-items: center;
    transition: height 0.15s ease;
}

.chart-position-line:hover {
    height: 6px;
}

.chart-position-line.long {
    background: var(--buy-green);
    border-top: 1px dashed var(--buy-green);
}

.chart-position-line.short {
    background: var(--sell-red);
    border-top: 1px dashed var(--sell-red);
}

.chart-position-line.sl {
    background: rgba(246, 70, 93, 0.8);
    box-shadow: 0 0 8px rgba(246, 70, 93, 0.5);
}

.chart-position-line.tp {
    background: rgba(14, 203, 129, 0.8);
    box-shadow: 0 0 8px rgba(14, 203, 129, 0.5);
}

.chart-position-line.entry {
    background: rgba(240, 185, 11, 0.8);
    box-shadow: 0 0 8px rgba(240, 185, 11, 0.5);
    cursor: default;
}

/* Position Labels */
.chart-position-label {
    position: absolute;
    right: -75px;
    top: -12px;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.7rem;
    color: white;
    white-space: nowrap;
}

.chart-position-line.long .chart-position-label {
    background: var(--buy-green);
}

.chart-position-line.short .chart-position-label {
    background: var(--sell-red);
}

.chart-position-line .line-label {
    position: absolute;
    right: -58px;
    background: var(--bg-secondary, #181a20);
    color: var(--text-primary, white);
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 2px;
    white-space: nowrap;
    font-weight: 600;
    min-width: 52px;
    text-align: center;
}

.chart-position-line.sl .line-label {
    background: var(--sell-red, #f6465d);
    color: white;
}

.chart-position-line.tp .line-label {
    background: var(--buy-green, #0ecb81);
    color: white;
}

.chart-position-line.entry .line-label {
    background: var(--accent-yellow, #f0b90b);
    color: var(--bg-primary, #000);
}

/* Position P&L */
.chart-position-pnl {
    position: absolute;
    right: -75px;
    top: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.chart-position-pnl.profit {
    color: var(--buy-green);
}

.chart-position-pnl.loss {
    color: var(--sell-red);
}

/* Drag Handle */
.chart-position-line .drag-handle {
    position: absolute;
    left: 10px;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.chart-position-line:hover .drag-handle {
    opacity: 1;
}

.chart-position-line .drag-handle i {
    font-size: 10px;
    color: white;
}

/* Position Lines Container */
.position-lines-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 99;
}

.position-lines-container .chart-position-line {
    pointer-events: auto;
}

.chart-position-line.dragging {
    opacity: 0.7;
    z-index: 101;
}

/* R:R Visualization */
.rr-visualization-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 80px;
    bottom: 30px;
    pointer-events: none;
    z-index: 50;
}

.rr-box {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    transition: all 0.1s ease;
}

.rr-box.risk {
    background: linear-gradient(90deg,
    rgba(246, 70, 93, 0.15) 0%,
    rgba(246, 70, 93, 0.08) 50%,
    rgba(246, 70, 93, 0.15) 100%);
    border-top: 1px dashed rgba(246, 70, 93, 0.6);
    border-bottom: 1px dashed rgba(246, 70, 93, 0.6);
}

.rr-box.reward {
    background: linear-gradient(90deg,
    rgba(14, 203, 129, 0.15) 0%,
    rgba(14, 203, 129, 0.08) 50%,
    rgba(14, 203, 129, 0.15) 100%);
    border-top: 1px dashed rgba(14, 203, 129, 0.6);
    border-bottom: 1px dashed rgba(14, 203, 129, 0.6);
}

.rr-label {
    position: absolute;
    right: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.rr-box.risk .rr-label {
    background: rgba(246, 70, 93, 0.9);
    top: 50%;
    transform: translateY(-50%);
}

.rr-box.reward .rr-label {
    background: rgba(14, 203, 129, 0.9);
    top: 50%;
    transform: translateY(-50%);
}

.rr-ratio-badge {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    z-index: 51;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.rr-ratio-badge .rr-value {
    font-size: 1rem;
}

.rr-ratio-badge .rr-text {
    font-size: 0.65rem;
    color: var(--text-muted);
}
