/* =====================================================
   Tutorial Studio
   Canvas Tool Center
   ===================================================== */

.canvas-tools-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.canvas-tools-head {
    flex-shrink: 0;
}

.canvas-tools-count {
    font-size: 11px;
    color: #858b98;
    font-weight: 500;
}

.canvas-tools-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
}

/* 搜索 */

.canvas-tools-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 11px;
    border: 1px solid #e3e6ed;
    background: #f8f9fb;
    border-radius: 8px;
    margin-bottom: 15px;
}

.canvas-tools-search > span {
    color: #858b98;
    font-size: 19px;
}

.canvas-tools-search input {
    flex: 1;
    width: 0;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #303541;
    font-size: 12px;
}

.canvas-tools-search button {
    border: 0;
    background: transparent;
    color: #777;
    cursor: pointer;
    font-size: 18px;
}

/* 分类导航 */

.canvas-tool-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 19px;
}

.canvas-tool-category {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    height: 34px;
    padding: 0 9px;
    border: 1px solid #e8eaf0;
    border-radius: 7px;
    background: #fff;
    color: #626979;
    font-size: 11px;
    cursor: pointer;
    transition: .18s ease;
}

.canvas-tool-category > span {
    font-size: 15px;
    color: #7b8291;
}

.canvas-tool-category:hover {
    border-color: #a5a8f5;
    background: #f7f7ff;
    color: #5558d9;
}

.canvas-tool-category.active {
    border-color: #7779e8;
    background: #f0f0ff;
    color: #5558d9;
    font-weight: 650;
}

.canvas-tool-category.active > span {
    color: #6366d9;
}

/* 分类标题 */

.canvas-tool-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.canvas-tool-section-heading h3 {
    margin: 0;
    font-size: 14px;
    color: #303541;
    font-weight: 700;
}

.canvas-tool-section-heading p {
    margin: 5px 0 0;
    color: #89909d;
    font-size: 11px;
    line-height: 1.5;
}

.canvas-tool-section-heading > span {
    flex-shrink: 0;
    color: #9298a5;
    font-size: 10px;
}

/* 工具网格 */

.canvas-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.canvas-tool-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 76px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 3px;
    border: 1px solid #e8eaf0;
    border-radius: 9px;
    background: #fff;
    color: #535b6b;
    font-size: 11px;
    cursor: pointer;
    transition: background .18s ease,
                border-color .18s ease,
                transform .18s ease;
}

.canvas-tool-card:hover {
    border-color: #a8aaf3;
    background: #f8f8ff;
    transform: translateY(-1px);
}

.canvas-tool-card.active {
    border-color: #7073e8;
    background: #f0f0ff;
    color: #5558d9;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, .08);
}

.canvas-tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    font-size: 23px;
    line-height: 1;
    color: #555e70;
}

.canvas-tool-card.active .canvas-tool-icon {
    color: #6265df;
}

.canvas-tool-card kbd {
    position: absolute;
    right: 4px;
    top: 4px;
    padding: 2px 3px;
    border-radius: 3px;
    background: #f0f1f5;
    color: #8b91a0;
    font-size: 8px;
    font-family: inherit;
}

.canvas-tool-empty {
    padding: 35px 10px;
    text-align: center;
    color: #9298a5;
}

.canvas-tool-empty > span {
    display: block;
    margin-bottom: 10px;
    font-size: 27px;
}

.canvas-tool-empty strong {
    display: block;
    color: #525968;
    font-size: 12px;
}

.canvas-tool-empty p {
    font-size: 11px;
}

/* 工具属性面板 */

.canvas-tool-properties {
    flex-shrink: 0;
    padding: 14px;
    border-top: 1px solid #e9ebf0;
    background: #fff;
}

.canvas-tool-properties-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
}

.canvas-tool-properties-head strong {
    color: #343a48;
    font-size: 12px;
}

.canvas-tool-properties-head > span {
    color: #777ce0;
    font-size: 11px;
}

.canvas-property-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.canvas-property-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.canvas-property-row label {
    color: #626979;
    font-size: 11px;
}

.canvas-property-row > span {
    color: #666c7b;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.canvas-property-group input[type="range"] {
    width: 100%;
    accent-color: #6366e8;
    cursor: pointer;
}

.canvas-property-row input[type="color"] {
    width: 30px;
    height: 24px;
    padding: 2px;
    border: 1px solid #e3e5eb;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

.canvas-tool-status {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid #f0f1f4;
    color: #858b98;
    font-size: 10px;
}

.canvas-tool-status-dot {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #27ae80;
}

/* 滚动条 */

.canvas-tools-body::-webkit-scrollbar {
    width: 5px;
}

.canvas-tools-body::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background: #dfe2e9;
}

.canvas-tools-body::-webkit-scrollbar-track {
    background: transparent;
}

/* 隐藏 */

.canvas-tools-panel [hidden] {
    display: none !important;
}