/* Feature Area Module Styles */

/* Feature buttons grid for "More" panel */
.more-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

/* Feature area - independent draggable box like config-area */
#feature-area {
    position: fixed;
    /* Position will be set dynamically above the "更多" button */
    z-index: 999;
    padding: 12px 16px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 165px;
    display: none;
    cursor: move;
    /* Improved touch device support */
    touch-action: none;
    /* Performance optimization */
    will-change: transform, left, top;
}

#feature-area.show {
    display: block;
}

#feature-area.dragging {
    cursor: grabbing;
}

/* Vertical feature area layout (when snapped to left or right) */
#feature-area.vertical {
    min-width: auto;
    max-width: 250px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Feature buttons - medium sized rounded squares */
.feature-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 10px;
    font-weight: 500;
    min-height: 56px;
    min-width: 56px;
    aspect-ratio: 1;
    width: 100%;
}

.feature-btn:hover {
    background-color: #f0f0f0;
    border-color: var(--theme-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.feature-btn.active {
    background-color: var(--theme-color);
    color: #ffffff;
    border-color: var(--theme-color);
}

.feature-btn.active svg {
    stroke: #ffffff;
}

.feature-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.feature-btn span {
    text-align: center;
    line-height: 1.2;
}
