/* =====================================================
   Button Styles - Monochrome Interactive Elements
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary Button - Solid Black */
.btn-primary {
    background: var(--gray-950);
    color: var(--text-inverse);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover:not(:disabled) {
    background: var(--gray-800);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Secondary Button */
.btn-secondary {
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

/* Success Button */
.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.2);
}

.btn-success:hover:not(:disabled) {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

/* Danger Button */
.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Warning Button */
.btn-warning {
    background: var(--warning);
    color: white;
    box-shadow: 0 1px 3px rgba(202, 138, 4, 0.2);
}

.btn-warning:hover:not(:disabled) {
    background: #a16207;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(202, 138, 4, 0.25);
}

/* Outline Variants */
.btn-outline-primary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--gray-900);
}

.btn-outline-primary:hover:not(:disabled) {
    background: var(--gray-950);
    color: var(--text-inverse);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--surface-border);
}

.btn-outline-secondary:hover:not(:disabled) {
    background: var(--gray-100);
    color: var(--text-primary);
    border-color: var(--gray-300);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: 0.8125rem;
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
    border-radius: var(--radius-xl);
}

/* Icon Button */
.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-lg);
}

.btn-icon.btn-sm {
    width: 36px;
    height: 36px;
}

.btn-icon.btn-lg {
    width: 52px;
    height: 52px;
}

/* Button Group */
.btn-group {
    display: inline-flex;
    gap: var(--space-2);
}

.btn-group-attached {
    display: inline-flex;
}

.btn-group-attached .btn {
    border-radius: 0;
}

.btn-group-attached .btn:first-child {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.btn-group-attached .btn:last-child {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}