/* dialog.css - 对话框和UI组件样式 */
#dialog {
    min-height: 60px;
    max-height: 360px;
    background-color: #f5f5f5;
    padding: 5px 20px;
    border-top: 1px solid #ccc;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    transition: all 0.3s ease;
}

.dialog-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 50px;
    position: relative;
}

/* 圆形按钮容器 */
.circle-button-container {
    position: relative;
    display: flex;
    align-items: flex-end;
    z-index: 1001;
}

/* 圆形按钮样式 */
.circle-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.circle-button:hover {
    background-color: #45a049;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* 坐标输入区域 */
#coordinateDialog {
    flex: 1;
    margin: 0 20px;
    display: flex;
    align-items: flex-end;
    position: relative;
    min-height: 40px;
}

.input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    min-height: 40px;
    z-index: 10001;
}

#coordinateInput {
    width: 100%;
    min-height: 40px;
    max-height: 336px;
    padding: 5px 60px 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
    font-size: 14px;
    background-color: white;
    position: relative;
    z-index: 10001;
    overflow-y: auto;
    line-height: 1.4;
    transition: all 0.3s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#coordinateInput::-webkit-scrollbar {
    display: none;
}

#coordinateInput:focus {
    outline: none;
    border-color: #4CAF50;
}

/* 文件上传按钮 */
#loadFileBtn {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    right: 20px;
    bottom: 5px;
    transform: scale(0.9);
    z-index: 10002;
}

#loadFileBtn:hover {
    background-color: #45a049;
    transform: scale(0.95);
}

/* 展开面板样式 */
.expand-panel {
    display: none;
    position: absolute;
    bottom: 100%;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    z-index: 1003;
    white-space: nowrap;
    min-width: 300px;
    max-width: 500px;
    margin-bottom: 5px;
}

.expand-panel.active {
    display: block;
}

/* 左侧面板定位 */
.circle-button-container.left .expand-panel {
    left: 0;
}

/* 右侧面板定位 */
.circle-button-container.right .expand-panel {
    right: 0;
}

/* 上传内容样式 */
.upload-content {
    width: 100%;
}

.upload-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

/* 功能内容样式 */
.function-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* 控制区域样式 */
.control-section {
    margin: 10px 0;
    width: 100%;
}

.control-section label {
    margin-right: 8px;
    font-size: 14px;
}

/* 要素类型按钮组 */
.feature-type-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    width: calc(36px * 3 + 5px * 2);
}

.feature-type-buttons {
    display: flex;
    gap: 10px;
    margin-left: 10px;
}

/* 按钮通用样式 */
.feature-button,
.style-dropdown-btn,
#pointColor,
#lineColor,
#polygonColor,
#polygonFill {
    width: 36px;
    height: 36px;
    border: 2px solid #ccc;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feature-button {
    width: 36px;
    height: 36px;
    border: 2px solid #ccc;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feature-button:hover {
    border-color: #4CAF50;
    transform: scale(1.05);
}

.feature-button.active {
    border-color: #4CAF50;
    background-color: #e8f5e8;
}

/* 样式控件样式 */
.style-controls {
    margin: 0px 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.style-controls label {
    font-size: 12px;
    margin-right: 8px;
}

.style-controls select,
.style-controls input[type="color"] {
    margin-right: 5px;
    font-size: 12px;
}

/* 整合颜色控制样式 */
.integrated-color-control {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.integrated-color-control input[type="color"] {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.integrated-color-control input[type="range"] {
    cursor: pointer;
}

.integrated-color-control input[type="number"] {
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px;
    font-size: 12px;
}

/* 点颜色按钮 */
#pointColor {
    width: 36px;
    height: 36px;
    border: 2px solid #ccc;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    padding: 2px;
}

#pointColor::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

#pointColor::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

#pointColor::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

/* 线颜色按钮 */
#lineColor {
    width: 36px;
    height: 36px;
    border: 2px solid #ccc;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    padding: 6px;
}

#lineColor::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 2px;
    height: 8px;
    width: 20px;
}

#lineColor::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

#lineColor::-moz-color-swatch {
    border: none;
    border-radius: 2px;
    height: 8px;
    width: 20px;
}

/* 面边框颜色按钮 */
#polygonColor {
    width: 36px;
    height: 36px;
    border: 2px solid #ccc;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    padding: 6px;
}

#polygonColor::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 2px;
    height: 8px;
    width: 20px;
}

#polygonColor::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

#polygonColor::-moz-color-swatch {
    border: none;
    border-radius: 2px;
    height: 8px;
    width: 20px;
}

/* 面填充颜色按钮 */
#polygonFill {
    width: 36px;
    height: 36px;
    border: 2px solid #ccc;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    padding: 4px;
}

#polygonFill::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 2px;
}

#polygonFill::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

#polygonFill::-moz-color-swatch {
    border: none;
    border-radius: 2px;
}

/* 样式下拉菜单 */
.style-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.style-dropdown-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #ccc;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.style-dropdown-btn:hover {
    border-color: #4CAF50;
    transform: scale(1.05);
}

.style-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 100px;
    margin-top: 5px;
}

.style-option {
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.style-option:hover {
    background-color: #f0f0f0;
}

.style-option img {
    width: 24px;
    height: 24px;
}

/* 上拉菜单 */
.grid-dropdown {
    display: none !important;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    min-width: 120px;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    top: auto;
    bottom: 100%;
    left: auto;
    right: 0;
    margin-bottom: 10px;
    z-index: 10000;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.grid-dropdown.show {
    display: flex !important;
}

.grid-dropdown .style-option {
    padding: 8px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grid-dropdown .style-option img {
    width: 20px;
    height: 20px;
}

/* 动作按钮样式 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* 输入区域样式 */
.input-section {
    margin-bottom: 10px;
    width: 100%;
}

.input-section textarea {
    width: 100%;
    height: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    font-family: Arial, sans-serif;
    font-size: 12px;
}

/* 文件上传样式 */
.file-upload {
    margin-bottom: 10px;
    width: 100%;
}

.file-upload input[type="file"] {
    margin-right: 8px;
    margin-bottom: 5px;
}