/* Modern Flat Button Styles - Compact */
.btn,
.btn-small,
.layer-btn,
.layer-btn-file,
.zoom-btn,
.arrow-btn,
.input-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Reduced gap */
    padding: 6px 12px;
    /* Reduced padding */
    font-size: 12px;
    /* Reduced font size */
    font-family: inherit;
    font-weight: 500;
    color: var(--text, #e6edf3);
    background: var(--panel2, #262626);
    border: 1px solid var(--border, #2e2e2e);
    /* Use root border color */
    border-radius: 4px;
    /* Slightly smaller radius */
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    user-select: none;
    line-height: 1.2;
}

/* Small Variants */
.btn-small,
.layer-btn,
.layer-btn-file {
    padding: 4px 8px;
    font-size: 11px;
    height: 24px;
    /* Reduced height */
    min-width: 24px;
}

/* Icon Buttons */
.zoom-btn,
.arrow-btn,
.input-action-btn {
    width: 28px;
    /* Reduced size */
    height: 28px;
    padding: 0;
    border-radius: 4px;
}

/* Hover State */
.btn:hover,
.btn-small:hover,
.layer-btn:hover,
.layer-btn-file:hover,
.zoom-btn:hover,
.arrow-btn:hover,
.input-action-btn:hover {
    background: #2a2a2a;
    color: #fff;
    z-index: 1;
}

/* Active / Pressed State */
.btn:active,
.btn-small:active,
.layer-btn:active,
.layer-btn-file:active,
.zoom-btn:active,
.arrow-btn:active,
.input-action-btn:active {
    background: #222;
}

/* Focus State */
.btn:focus-visible,
.btn-small:focus-visible,
.layer-btn:focus-visible,
.layer-btn-file:focus-visible,
.zoom-btn:focus-visible,
.arrow-btn:focus-visible,
.input-action-btn:focus-visible {
    outline: 2px solid #fab387;
    outline-offset: 2px;
}

/* Disabled State */
.btn:disabled,
.btn.disabled,
.btn-small:disabled,
.btn-small.disabled,
.layer-btn:disabled,
.layer-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #1a1a1a;
}

/* Primary Variant */
.btn.primary {
    background: #fab387;
    color: #1e1e2e;
}

.btn.primary:hover {
    background: #f9e2af;
    color: #1e1e2e;
}

/* Ripple Animation */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.5s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}