/* Portfolio Now - Button Component Styles
 * Unified button styles used across dashboard, landing, and templates
 */

/* === BASE BUTTON === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

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

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* === BUTTON SIZES === */
.btn-xs {
    padding: calc(var(--space-xs) * 0.75) var(--space-sm);
    font-size: var(--text-xs);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-lg);
}

.btn-xl {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--text-xl);
}

/* === BUTTON VARIANTS === */

/* Primary Button - Main action */
.btn-primary {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

/* Secondary Button - Alternative action */
.btn-secondary {
    background: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Ghost Button - Minimal style */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text);
}

.btn-ghost.active {
    background: var(--primary);
    color: var(--neural-white);
}

/* Success Button - Positive actions */
.btn-success {
    background: var(--success);
    color: var(--neural-white);
    box-shadow: var(--shadow);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Warning Button - Caution actions */
.btn-warning {
    background: var(--warning);
    color: var(--neural-white);
    box-shadow: var(--shadow);
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Error Button - Destructive actions */
.btn-error {
    background: var(--error);
    color: var(--neural-white);
    box-shadow: var(--shadow);
}

.btn-error:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* === CYBERPUNK BUTTONS === */
/* Special buttons for landing page with cyber aesthetic */

.cyber-btn {
    position: relative;
    background: linear-gradient(135deg, var(--electric-blue), var(--cyber-purple));
    color: var(--neural-white);
    border: none;
    padding: var(--space-lg) var(--space-2xl);
    border-radius: var(--radius-lg);
    font-family: var(--font-family-space);
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    box-shadow: var(--glow-shadow) rgba(0, 212, 255, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.cyber-btn:hover::before {
    left: 100%;
}

.cyber-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--glow-shadow) rgba(0, 212, 255, 0.6);
}

.cyber-btn:active {
    transform: translateY(-2px) scale(1.01);
}

/* Cyber button variants */
.cyber-btn-success {
    background: linear-gradient(135deg, var(--neon-green), var(--quantum-gold));
    box-shadow: var(--glow-shadow) rgba(0, 255, 136, 0.3);
}

.cyber-btn-success:hover {
    box-shadow: var(--glow-shadow) rgba(0, 255, 136, 0.6);
}

.cyber-btn-warning {
    background: linear-gradient(135deg, var(--quantum-gold), var(--plasma-pink));
    box-shadow: var(--glow-shadow) rgba(255, 215, 0, 0.3);
}

.cyber-btn-warning:hover {
    box-shadow: var(--glow-shadow) rgba(255, 215, 0, 0.6);
}

/* === SPECIAL EFFECTS === */

/* Magic hover effect */
.btn-magic {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-magic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-magic:hover::before {
    left: 100%;
}

.btn-magic:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Pulsing effect for important buttons */
.btn-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* === RESPONSIVE BUTTON STYLES === */

/* Mobile optimizations */
@media (max-width: 767px) {
    .btn {
        min-height: 44px; /* Touch target minimum */
        min-width: 44px;
        padding: var(--space-md) var(--space-lg);
    }
    
    .btn-xs {
        min-height: 36px;
        padding: var(--space-sm) var(--space-md);
    }
    
    .btn-sm {
        min-height: 40px;
        padding: var(--space-sm) var(--space-lg);
    }
    
    .btn-lg {
        min-height: 48px;
        padding: var(--space-lg) var(--space-xl);
    }
    
    .cyber-btn {
        min-height: 48px;
        padding: var(--space-md) var(--space-xl);
        font-size: var(--text-base);
    }
    
    /* Full width mobile buttons */
    .btn-mobile-full {
        width: 100%;
        justify-content: center;
    }
    
    /* Improved tap highlighting */
    .btn {
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* === BUTTON GROUPS === */
.btn-group {
    display: inline-flex;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.btn-group .btn {
    border-radius: 0;
    border-right: 1px solid var(--border-color);
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border-right: none;
}

.btn-group .btn:only-child {
    border-radius: var(--radius);
    border-right: none;
}