/* Shared Tools Card Styles */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px;
    background: #F8F9FA;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    min-height: 72px;
    position: relative;
    overflow: hidden;
}

.tool-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(131, 46, 197, 0.1) 0%, rgba(185, 0, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #D0D0D0;
    background: #FFFFFF;
}

.tool-btn:active {
    transform: translateY(0);
}

.tool-btn.selected,
.tool-btn.active {
    background: #FFFFFF;
    border-color: #832EC5;
    box-shadow: 0 4px 12px rgba(131, 46, 197, 0.15);
}

.tool-btn.selected::before,
.tool-btn.active::before {
    opacity: 1;
}

.tool-btn.selected .tool-label,
.tool-btn.active .tool-label,
.tool-btn.selected > span:last-child,
.tool-btn.active > span:last-child {
    color: #832EC5;
    font-weight: 600;
}

.tool-btn.selected .tool-icon,
.tool-btn.active .tool-icon {
    filter: drop-shadow(0 2px 4px rgba(131, 46, 197, 0.2));
    transform: scale(1.1);
}

/* Disabled state */
.tool-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tool-icon-wrap {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.tool-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Direct icon children (without wrapper) */
.tool-btn > .tool-icon {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}

.tool-label,
.tool-btn > span:last-child {
    font-size: 11px;
    font-weight: 500;
    color: #555555;
    text-align: center;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    transition: color 0.2s ease;
}

/* Tooltip styles */
.tool-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: tooltip-fade 0.2s ease forwards;
    z-index: 100;
}

@keyframes tooltip-fade {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(-8px); }
}
