/* 管道功能样式 */

/* 管道按钮激活状态 */
#pipeline-btn.active {
    background: #4CAF50;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* 管道信息弹窗 - 复用标记弹窗样式 */
.pipeline-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 2000;
    width: 85%;
    max-width: 400px;
    display: none;
    box-sizing: border-box;
    overflow: hidden;
}

.pipeline-popup .popup-header {
    font-size: 16px;
    font-weight: normal;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    position: relative;
}

.pipeline-popup .popup-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.pipeline-popup .popup-content {
    padding: 0;
}

.pipeline-info-row {
    display: flex;
    padding: 10px 15px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.pipeline-info-row:last-child {
    border-bottom: none;
}

.pipeline-info-row .label {
    width: 80px;
    color: #666;
    flex-shrink: 0;
}

.pipeline-info-row .value {
    flex: 1;
    color: #333;
}

.pipeline-remark {
    background-color: #f5f5f5;
    padding: 12px 15px;
    color: #666;
    font-size: 14px;
    margin-top: 0;
    min-height: 40px;
}

.pipeline-popup .popup-buttons {
    display: flex;
    padding: 0;
    margin: 15px;
}

.pipeline-popup .popup-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    margin: 0 5px;
    border-radius: 5px;
}

.pipeline-popup .popup-btn.edit {
    background: #4CAF50;
    color: white;
}

.pipeline-popup .popup-btn.edit[disabled] {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

.pipeline-popup .popup-btn.delete {
    background: #F44336;
    color: white;
}

.pipeline-popup .popup-btn.delete[disabled] {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 管道编辑弹窗 */
.pipeline-edit-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 2001;
    width: 85%;
    max-width: 400px;
    display: none;
    box-sizing: border-box;
    overflow: hidden;
}

.pipeline-edit-popup .popup-header {
    font-size: 16px;
    font-weight: normal;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    position: relative;
}

.pipeline-edit-popup .popup-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.pipeline-edit-popup .popup-content {
    padding: 15px;
}

.pipeline-edit-popup .form-group {
    margin-bottom: 15px;
}

.pipeline-edit-popup .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.pipeline-edit-popup .form-group input,
.pipeline-edit-popup .form-group select,
.pipeline-edit-popup .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}

.pipeline-edit-popup .form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.pipeline-edit-popup .popup-buttons {
    display: flex;
    padding: 0 15px 15px;
    gap: 10px;
}

.pipeline-edit-popup .popup-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    border-radius: 5px;
}

.pipeline-edit-popup .popup-btn:first-child {
    background: #4CAF50;
    color: white;
}

.pipeline-edit-popup .popup-btn.cancel {
    background: #999;
    color: white;
}

/* 弹窗遮罩 */
.pipeline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
}

/* 绘制提示 - 左上角 */
.pipeline-draw-tip {
    position: fixed;
    top: 80px;
    left: 20px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1500;
    pointer-events: none;
    max-width: 280px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 管道类型图标 */
.pipeline-type-icon {
    display: inline-block;
    margin-right: 5px;
    font-size: 16px;
}

/* 路径调整完成按钮 - 右下角 */
.finish-adjust-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    z-index: 2002;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.finish-adjust-btn:hover {
    background: #45a049;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.5);
    transform: scale(1.05);
}

.finish-adjust-btn:active {
    transform: scale(0.95);
}

.finish-adjust-btn span:first-child {
    font-size: 20px;
    line-height: 1;
}

.finish-adjust-btn span:last-child {
    font-size: 15px;
    line-height: 1;
}

/* 完成绘制按钮 - 右下角（与完成调整按钮样式相同） */
.finish-draw-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    z-index: 2002;
    display: none;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.finish-draw-btn:active {
    transform: scale(0.95);
    background: #45a049;
}

.finish-draw-btn span:first-child {
    font-size: 20px;
    line-height: 1;
}

.finish-draw-btn span:last-child {
    font-size: 15px;
    line-height: 1;
}


/* 自定义选择器样式 - 解决Android原生picker不显示文字的问题 */
.custom-select {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.custom-select-display {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    position: relative;
}

.custom-select-display::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #666;
    pointer-events: none;
}

.custom-select.open .custom-select-display::after {
    content: '▲';
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 3000;
    display: none;
    max-height: 250px;
    overflow-y: auto;
}

.custom-select.open .custom-select-dropdown {
    display: block;
}

.custom-select-option {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:active,
.custom-select-option.selected {
    background: #e8f5e9;
    color: #4CAF50;
}

.custom-select-option.selected::after {
    content: '✓';
    float: right;
    color: #4CAF50;
    font-weight: bold;
}
