

.technical-lines-section {
    background: rgba(75, 45, 85, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 10px 12px;
    transition: all 0.3s ease;
    position: relative;
}

.technical-lines-section:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
}

.technical-lines-header {
    color: #d4af37;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    transition: all 0.3s ease;
}

.technical-lines-header:hover {
    color: #f0d76b;
}

.technical-lines-arrow {
    font-size: 8px;
    transition: transform 0.3s ease;
    color: rgba(212, 175, 55, 0.8);
}

.technical-lines-controls {
    opacity: 1;
    padding-top: 12px;
    transition: all 0.3s ease;
}

.technical-lines-controls.collapsed {
    opacity: 0;
    padding-top: 0;
    overflow: hidden;
}

.indicators-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.indicator-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(75, 45, 85, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
    min-height: 32px;
}

.indicator-row:hover {
    background: rgba(75, 45, 85, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

:root {
    --ema5-color: #00ff00;   
    --ema10-color: #bf32e6b4;  
    --ema20-color: #0099ff;  
    --ema50-color: #ff0000;  
    --bb-upper-color: #808080; 
    --bb-middle-color: #666666; 
    --bb-lower-color: #808080; 
}

.indicator-row.active[data-indicator="ema5"] {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.15), rgba(0, 255, 0, 0.08));
    border-color: var(--ema5-color);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.25);
}

.indicator-row.active[data-indicator="ema10"] {
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.15), rgba(255, 255, 0, 0.08));
    border-color: var(--ema10-color);
    box-shadow: 0 0 12px rgba(255, 255, 0, 0.25);
}

.indicator-row.active[data-indicator="ema20"] {
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.15), rgba(0, 153, 255, 0.08));
    border-color: var(--ema20-color);
    box-shadow: 0 0 12px rgba(0, 153, 255, 0.25);
}

.indicator-row.active[data-indicator="ema50"] {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.15), rgba(255, 0, 0, 0.08));
    border-color: var(--ema50-color);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.25);
}

.indicator-row.active[data-indicator="bollinger"] {
    background: linear-gradient(135deg, rgba(128, 128, 128, 0.15), rgba(102, 102, 102, 0.08));
    border-color: var(--bb-middle-color);
    box-shadow: 0 0 12px rgba(128, 128, 128, 0.25);
}

.indicator-line-ema5 {
    stroke: var(--ema5-color);
}

.indicator-line-ema10 {
    stroke: var(--ema10-color);
}

.indicator-line-ema20 {
    stroke: var(--ema20-color);
}

.indicator-line-ema50 {
    stroke: var(--ema50-color);
}

.indicator-line-bb-upper {
    stroke: var(--bb-upper-color);
}

.indicator-line-bb-middle {
    stroke: var(--bb-middle-color);
}

.indicator-line-bb-lower {
    stroke: var(--bb-lower-color);
}

.indicator-line-default {
    stroke: #ffffff;
}

.indicator-row.multi-value {
    align-items: flex-start;
    min-height: 60px;
}

.indicator-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0; 
}

.indicator-checkbox {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 3px;
    background: rgba(75, 45, 85, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.indicator-checkbox:checked {
    background: #d4af37;
    border-color: #d4af37;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

.indicator-checkbox:checked::after {
    content: "✓";
    position: absolute;
    top: -2px;
    left: 2px;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: bold;
}

.indicator-checkbox:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 4px rgba(212, 175, 55, 0.3);
    transform: scale(1.05);
}

.indicator-checkbox:focus {
    outline: 2px solid rgba(212, 175, 55, 0.5);
    outline-offset: 2px;
}

.indicator-label {
    color: #e0e0e0;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

.indicator-row.active .indicator-label {
    color: #d4af37;
}

.period-input {
    width: 35px;
    height: 16px;
    background: rgba(75, 45, 85, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 3px;
    color: #d4af37;
    font-size: 9px;
    text-align: center;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0 2px;
}

.period-input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 4px rgba(212, 175, 55, 0.3);
    background: rgba(75, 45, 85, 0.12);
}

.period-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(75, 45, 85, 0.05);
    border-color: rgba(212, 175, 55, 0.1);
    color: rgba(212, 175, 55, 0.3);
}

.indicator-value {
    color: #d4af37;
    font-size: 9px;
    font-weight: 400;
    text-align: right;
    line-height: 1.3;
    min-width: 50px;
    flex-shrink: 0;
    align-self: center;
}

.indicator-values {
    color: #d4af37;
    font-size: 9px;
    font-weight: 400;
    text-align: right;
    line-height: 1.3;
    min-width: 80px;
    flex-shrink: 0;
}

.indicator-values .value-line {
    margin-bottom: 2px;
}

.indicator-values .value-line:last-child {
    margin-bottom: 0;
}

.lines-list:empty::before {
    content: "No manual lines added";
    color: rgba(212, 175, 55, 0.4);
    font-size: 9px;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 12px;
}

.technical-lines-section:focus-within {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

@media (max-width: 400px) {
    .technical-lines-section {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .indicators-grid {
        gap: 6px;
    }
    
    .indicator-row {
        padding: 5px 6px;
        min-height: 30px;
    }
    
    .indicator-checkbox {
        width: 12px;
        height: 12px;
    }
    
    .indicator-checkbox:checked::after {
        font-size: 10px;
        top: -1px;
        left: 1px;
    }
    
    .indicator-label {
        font-size: 9px;
    }
    
    .indicator-value,
    .indicator-values {
        font-size: 8px;
        min-width: 40px;
    }
    
    .period-input {
        width: 30px;
        height: 14px;
        font-size: 8px;
    }
    
    .add-line-btn {
        font-size: 9px;
        padding: 6px 8px;
    }
}

.indicator-row.no-data .indicator-checkbox:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(60, 60, 60, 0.3);
    border-color: rgba(100, 100, 100, 0.4);
}

.indicator-row.no-data .indicator-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.indicator-row.no-data .indicator-value {
    color: #666;
    font-style: italic;
}

.indicator-row.no-data:hover {
    background: rgba(75, 45, 85, 0.08);
    border-color: rgba(212, 175, 55, 0.2);
}

.indicator-row.display-only {
    background: rgba(60, 40, 70, 0.06);
    border-style: dashed;  
    cursor: default;
}

.drawing-tool-row {
    margin: 4px 0;
}

.drawing-tool-btn {
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawing-tool-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateX(2px);
}

.drawing-tool-btn:active {
    background: rgba(212, 175, 55, 0.25);
    transform: translateX(0);
}

.drawing-tool-btn.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.tool-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    display: inline-block;
}

.clear-all-btn {
    margin-top: 8px;
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.clear-all-btn:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.draw-lines-content[style*="block"] {
    animation: slideDown 0.3s ease-out;
}

#drawLinesSection:not(.scenario-active) .drawing-tool-btn {
    background: rgba(60, 60, 60, 0.3);
    border: 1px solid rgba(100, 100, 100, 0.4);
    color: rgba(212, 175, 55, 0.3);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.5;
}

#drawLinesSection.scenario-active .drawing-tool-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
}

#drawLinesSection.scenario-active .drawing-tool-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateX(2px);
}

#drawLinesSection.scenario-active .drawing-tool-btn.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

#drawLinesSection.scenario-active .clear-all-btn {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

#drawLinesSection.scenario-active .clear-all-btn:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
}

#drawLinesSection:not(.scenario-active) .clear-all-btn {
    background: rgba(60, 60, 60, 0.3);
    border-color: rgba(100, 100, 100, 0.4);
    color: rgba(244, 67, 54, 0.3);
}

.user-drawn-vertical-line-container {
    position: absolute;
    top: 0;
    width: 11px;
    height: 100%;
    z-index: 15;
    cursor: pointer;
}

.user-drawn-vertical-line {
    position: absolute;
    left: 5px;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 0, 0.8);
    pointer-events: none;
    transition: all 0.2s ease;
}

.vertical-line-candle-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 5px;
    background: rgba(255, 255, 0, 0.9);
    color: #000;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    border-bottom: 3px solid #ffff00;
    z-index: 16;
    box-shadow: 0 0 4px rgba(255, 255, 0, 0.5);
    pointer-events: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.preview-vertical-line {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 0, 0.5);
    z-index: 14;
    pointer-events: none;
    display: none;
    opacity: 0.7;
    border-left: 1px dashed #ffff00;
}

.preview-vertical-label {
    position: absolute;
    bottom: 5px;
    transform: translateX(-50%);
    background: rgba(255, 255, 0, 0.7);
    color: #000;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    border-bottom: 3px solid rgba(255, 255, 0, 0.7);
    z-index: 14;
    pointer-events: none;
    display: none;
    white-space: nowrap;
}

.user-drawn-vertical-line-container:hover {
    background: rgba(255, 221, 0, 0.1);
}

.line-context-menu {
    position: fixed;
    background: #1a1a1a;
    border: 1px solid #ff6b35;
    border-radius: 4px;
    padding: 4px 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.line-context-menu > div {
    padding: 6px 12px;
    color: #ff6b35;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.line-context-menu > div:hover {
    background: rgba(255, 107, 53, 0.2);
}

.user-drawn-line-container {
    position: absolute;
    left: 0;
    right: 0;
    height: 11px;
    z-index: 15;
    cursor: pointer;
}

.user-drawn-horizontal-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 5px;
    height: 1px;
    background: rgba(255, 255, 0, 0.8);
    pointer-events: none;
    transition: all 0.2s ease;
}

.line-price-label {
    position: absolute;
    right: 5px;
    top: -5px;
    background: rgba(255, 255, 0, 0.9);
    color: #000;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    border-right: 3px solid #ffff00;
    z-index: 16;
    box-shadow: 0 0 4px rgba(255, 255, 0, 0.5);
    pointer-events: none;
    transition: all 0.2s ease;
}

.preview-horizontal-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 0, 0.5);
    z-index: 14;
    pointer-events: none;
    display: none;
    opacity: 0.7;
    border-top: 1px dashed #ffff00;
}

.user-drawn-trendline-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}

.user-drawn-trendline {
    stroke: rgba(255, 255, 0, 0.8);
    stroke-width: 2;
    fill: none;
    pointer-events: stroke;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trendline-label {
    position: absolute;
    background: rgba(255, 255, 0, 0.9);
    color: #000;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    border: 2px solid #ffff00;
    z-index: 16;
    box-shadow: 0 0 4px rgba(255, 255, 0, 0.5);
    pointer-events: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.preview-trendline {
    stroke: rgba(255, 255, 0, 0.5);
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    fill: none;
    pointer-events: none;
    visibility: hidden;  
}

.preview-trendline-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 0, 0.7);
    border: 2px solid #ffff00;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 14;
    pointer-events: none;
}

.user-drawn-fibonacci-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}

.fibonacci-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 0, 0.8);
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fibonacci-line:nth-child(2) { 
    background: rgba(255, 255, 0, 0.6);
}

.fibonacci-line:nth-child(3) { 
    background: rgba(255, 255, 0, 0.7);
}

.fibonacci-line:nth-child(4) { 
    background: rgba(255, 255, 0, 0.9);
    height: 2px; 
}

.fibonacci-line:nth-child(5) { 
    background: rgba(255, 255, 0, 1);
    height: 2px; 
    box-shadow: 0 0 3px rgba(255, 255, 0, 0.5);
}

.fibonacci-label {
    position: absolute;
    right: 5px;
    background: rgba(255, 255, 0, 0.9);
    color: #000;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    border-right: 3px solid #ffff00;
    z-index: 16;
    pointer-events: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.fibonacci-line:hover {
    background: rgba(255, 255, 0, 1);
    box-shadow: 0 0 6px rgba(255, 255, 0, 0.6);
    height: 2px;
}

.user-drawn-fibonacci-container.selected .fibonacci-line {
    background: rgba(255, 255, 0, 1);
    box-shadow: 0 0 4px rgba(255, 255, 0, 0.8);
}

.user-drawn-fibonacci-container.selected .fibonacci-label {
    transform: scale(1.1);
    box-shadow: 0 0 6px rgba(255, 255, 0, 0.8);
    background: rgba(255, 255, 0, 1);
}

#preview-fibonacci-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 14;
}

#preview-fibonacci-container div[style*="height: 1px"] {
    opacity: 0.6;
    animation: pulse 1s infinite;
}

#preview-fibonacci-container div[style*="padding"] {
    opacity: 0.8;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.7; }
    100% { opacity: 0.4; }
}

@media (max-width: 600px) {
    .fibonacci-label {
        font-size: 9px;
        padding: 1px 4px;
    }
}

@container (max-width: 219px) {
    
    .indicator-row[data-indicator="macd"] {
        display: none !important;
    }

    .indicator-value,
    .indicator-values {
        display: none !important;
    }

    .indicator-row {
        padding: 5px 6px !important;
        min-height: 28px !important;
    }
    
    .indicator-left {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .indicator-checkbox {
        width: 12px !important;
        height: 12px !important;
    }
    
    .indicator-checkbox:checked::after {
        font-size: 10px !important;
        top: -1px !important;
        left: 1px !important;
    }
    
    .indicator-label {
        font-size: 9px !important;
        flex: 1 !important;
    }

    .indicator-row.multi-value {
        min-height: 28px !important;
    }

    .period-input {
        width: 28px !important;
        height: 14px !important;
        font-size: 8px !important;
    }

    .drawing-tool-btn {
        padding: 8px !important;
        justify-content: center !important;
        min-height: 36px !important;
        font-size: 0 !important; 
    }
    
    .tool-icon {
        font-size: 20px !important;
        width: auto !important;
        margin: 0 !important;
    }

    .clear-all-btn {
        padding: 8px !important;
        justify-content: center !important;
        min-height: 36px !important;
        font-size: 0 !important; 
    }
    
    .clear-all-btn .tool-icon {
        font-size: 20px !important;
    }

    .drawing-tool-row {
        margin: 2px 0 !important;
    }

    .technical-lines-section {
        padding: 8px 10px !important;
    }
    
    .indicators-grid {
        gap: 4px !important;
    }
}

.technical-lines-section {
    max-width: calc(100% - 10px) !important;
    width: calc(100% - 10px);
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 600px) {
    .technical-lines-section {
        max-width: calc(98% - 10px) !important;
        transform: scale(1.02);
        transform-origin: top center;
    }
}

@media (min-width: 700px) {
    .technical-lines-section {
        max-width: calc(96% - 10px) !important;
        transform: scale(1.04);
        transform-origin: top center;
    }
}

#drawLinesSection {
    margin-bottom: 35px;
    margin-bottom: 25px !important;
}

.draw-lines-header {
    margin-top: 15px;
}

