/* Line Style Modal CSS */
/* Styles for the independent line style settings modal */

/* Line Style Modal */
#line-style-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

#line-style-modal.show {
    display: flex;
}

.line-style-modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    min-width: 400px;
    max-width: 500px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.line-style-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.line-style-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.line-style-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background-color: #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.line-style-modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

.line-style-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Line Style Type Grid */
.line-style-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.line-style-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 70px;
}

.line-style-type-btn:hover {
    border-color: #ccc;
    background: #f5f5f5;
}

.line-style-type-btn.active {
    border-color: var(--theme-color, #007AFF);
    background: rgba(0, 122, 255, 0.1);
}

.line-style-type-btn svg {
    width: 50px;
    height: 20px;
    margin-bottom: 6px;
    color: #333;
}

.line-style-type-btn.active svg {
    color: var(--theme-color, #007AFF);
}

.line-style-type-btn span {
    font-size: 11px;
    color: #666;
}

.line-style-type-btn.active span {
    color: var(--theme-color, #007AFF);
    font-weight: 500;
}

/* Line Style Settings Group */
.line-style-modal-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.line-style-modal-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.line-style-modal-group .settings-hint {
    font-size: 12px;
    color: #888;
    margin-top: -6px;
}

/* Line Style Settings */
.line-style-modal-settings {
    padding: 16px;
    background: #f8f8f8;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.line-style-modal-setting {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.line-style-modal-setting label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.line-style-modal-setting .slider {
    width: 100%;
}

/* Arrow Type Options */
.arrow-type-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.arrow-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.arrow-type-btn:hover {
    border-color: #ccc;
    background: #f5f5f5;
}

.arrow-type-btn.active {
    border-color: var(--theme-color, #007AFF);
    background: rgba(0, 122, 255, 0.1);
}

.arrow-type-btn svg {
    width: 40px;
    height: 16px;
    margin-bottom: 4px;
    color: #333;
}

.arrow-type-btn.active svg {
    color: var(--theme-color, #007AFF);
}

.arrow-type-btn span {
    font-size: 10px;
    color: #666;
}

.arrow-type-btn.active span {
    color: var(--theme-color, #007AFF);
    font-weight: 500;
}

/* Open line style button */
.open-line-style-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
}

.open-line-style-btn:hover {
    border-color: var(--theme-color, #007AFF);
    background: rgba(0, 122, 255, 0.05);
    color: var(--theme-color, #007AFF);
}

.open-line-style-btn svg {
    width: 18px;
    height: 18px;
}

/* Line style preview area */
.line-style-preview-area {
    position: relative;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.line-style-preview-area canvas {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Preview expand button */
.preview-expand-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-expand-btn:hover {
    background: #ffffff;
    color: var(--theme-color, #007AFF);
}

/* Expanded preview modal */
#line-style-preview-expanded-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2100;
    display: none;
    align-items: center;
    justify-content: center;
}

#line-style-preview-expanded-modal.show {
    display: flex;
}

.expanded-preview-modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.expanded-preview-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 10px;
}

.expanded-preview-body canvas {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Modal footer buttons */
.line-style-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.line-style-modal-footer .btn-secondary {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.line-style-modal-footer .btn-secondary:hover {
    background: #e8e8e8;
}

.line-style-modal-footer .btn-primary {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: var(--theme-color, #007AFF);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.line-style-modal-footer .btn-primary:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .line-style-modal-content {
        min-width: 90vw;
        padding: 20px;
    }
    
    .line-style-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
