﻿/* /Content/opening-type-diagram.css (v5 - Leader Line Fix) */

.opening-type-scenario {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    margin: 30px 0;
}

/* K線基本樣式 */
.candle .body {
    border-radius: 1px;
}

.candle.bullish .wick {
    background-color: #dc3545;
}

.candle.bullish .body {
    background-color: #dc3545;
    border: 1px solid #b02a37;
}

.candle.bearish .wick {
    background-color: #28a745;
}

.candle.bearish .body {
    background-color: #28a745;
    border: 1px solid #208637;
}

.candle:not(.bullish):not(.bearish) .wick {
    background-color: #6c757d;
}

.candle:not(.bullish):not(.bearish) .body {
    background-color: #6c757d;
    border: 1px solid #5a6268;
}

/* --- Annotation & NEW Leader Line Styles --- */
.chart-annotation-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    animation: fadeInAnnotation 1s ease forwards;
    animation-delay: 0.5s; /* Delay the animation start */
}

.chart-annotation {
    position: absolute;
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    border: 1px solid rgba(0,0,0,0.2);
    transform: translateX(-50%); /* Default center alignment */
}

    .chart-annotation.anno-bullish {
        background-color: #ffe8e8;
        color: #721c24;
    }

    .chart-annotation.anno-bearish {
        background-color: #d4edda;
        color: #155724;
    }

    .chart-annotation.annotation-align-right {
        transform: translateX(-100%);
    }

    .chart-annotation.annotation-align-left {
        transform: translateX(0);
    }
/* New alignment */


/* NEW classes for the leader line components */
.leader-line-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, 50%); /* Correct centering on the price point */
}

    .leader-line-dot.anno-bullish {
        background-color: #721c24;
    }

    .leader-line-dot.anno-bearish {
        background-color: #155724;
    }

.leader-line {
    position: absolute;
    background-color: #888;
}

@keyframes fadeInAnnotation {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
