/*
 * Button Components
 */

.wishly-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--w-space-2);
    padding: var(--w-space-3) var(--w-space-6);
    font-size: var(--w-text-sm);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--w-radius-lg);
    transition: all var(--w-transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.wishly-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--w-transition-fast);
}

.wishly-btn:hover::before {
    opacity: 1;
}

/* Primary */
.wishly-btn--primary {
    background: var(--w-gradient-primary);
    background-size: 200% 200%;
    background-position: 0% 50%;
    color: #fff;
    box-shadow: var(--w-shadow-glow-sm);
    transition: all var(--w-transition-fast), background-position 0.4s ease;
}

.wishly-btn--primary::before {
    background: rgba(255, 255, 255, 0.15);
}

.wishly-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--w-shadow-glow), 0 4px 24px rgba(124, 58, 237, 0.35);
    background-position: 100% 50%;
}

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

/* Secondary */
.wishly-btn--secondary {
    background: var(--w-bg-glass);
    color: var(--w-text-primary);
    border: 1px solid var(--w-border-secondary);
    backdrop-filter: var(--w-glass-blur);
}

.wishly-btn--secondary::before {
    background: rgba(255, 255, 255, 0.05);
}

.wishly-btn--secondary:hover {
    border-color: var(--w-accent);
    color: var(--w-accent);
}

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

.wishly-btn--ghost:hover {
    background: var(--w-bg-glass);
    color: var(--w-text-primary);
}

/* Danger */
.wishly-btn--danger {
    background: var(--w-error);
    color: #fff;
}

.wishly-btn--danger:hover {
    background: #dc2626;
}

/* Sizes */
.wishly-btn--sm {
    padding: var(--w-space-2) var(--w-space-4);
    font-size: var(--w-text-xs);
    border-radius: var(--w-radius-md);
}

.wishly-btn--lg {
    padding: var(--w-space-4) var(--w-space-8);
    font-size: var(--w-text-base);
    border-radius: var(--w-radius-xl);
}

.wishly-btn--xl {
    padding: var(--w-space-5) var(--w-space-10);
    font-size: var(--w-text-lg);
    border-radius: var(--w-radius-xl);
}

/* Full width */
.wishly-btn--full {
    width: 100%;
}

/* Icon only */
.wishly-btn--icon {
    padding: var(--w-space-3);
    border-radius: var(--w-radius-lg);
}

/* Disabled */
.wishly-btn:disabled,
.wishly-btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading state */
.wishly-btn--loading {
    color: transparent;
    pointer-events: none;
}

.wishly-btn--loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wishly-spin 0.6s linear infinite;
}

/* Focus styles for accessibility */
.wishly-btn:focus-visible {
    outline: 2px solid var(--w-accent);
    outline-offset: 2px;
}
