/* Button Base Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
    text-decoration: none;
    gap: 0.375rem;
    box-sizing: border-box;
}

.btn:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Size Variants */
.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
}

.btn-md {
    padding: 0.4375rem 1.125rem;
    font-size: 0.9375rem;
}

.btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
}

/* Primary Button - Green (Main Actions) */
.btn-primary {
    background-color: #065f46;
    color: white;
}

.btn-primary:hover {
    background-color: #054f3a;
}

.btn-primary:active {
    background-color: #043f2e;
    transform: scale(0.98);
}

/* Secondary Button - Gray Outline (Cancel, Reset) */
.btn-secondary {
    background-color: transparent;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-secondary:active {
    background-color: #f3f4f6;
}

/* Destructive Button - Red (Delete, Remove) */
.btn-destructive {
    background-color: #ef4444;
    color: white;
}

.btn-destructive:hover {
    background-color: #dc2626;
}

.btn-destructive:active {
    background-color: #b91c1c;
    transform: scale(0.98);
}

/* Edit Button - Sky Blue (Edit Actions) */
.btn-edit {
    background-color: #0ea5e9;
    color: white;
}

.btn-edit:hover {
    background-color: #0284c7;
}

.btn-edit:active {
    background-color: #0369a1;
    transform: scale(0.98);
}

/* Link Button - Text-based (Load More, etc.) */
.btn-link {
    background-color: transparent;
    color: #4a6fa5;
    padding: 0.4375rem 0.625rem;
}

.btn-link:hover {
    color: #2E5F7F;
    text-decoration: underline;
}

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

.btn-loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Icon Buttons */
.btn-icon {
    padding: 0.4375rem;
    width: 2.25rem;
    height: 2.25rem;
}

/* Full Width on Mobile */
.btn-full {
    width: 100%;
}

@media (min-width: 768px) {
    .btn-full {
        width: auto;
    }
}
