/* ============================================================================
   SIGNALDESK - BUTTONS COMPONENT
   Creative, interactive buttons with stunning animations and hover effects
   ============================================================================ */

/* Base Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--font-base);
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

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

/* ============================================================================
   PRIMARY BUTTON - Main CTA
   ============================================================================ */

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

/* Shine Effect Animation */
.btn-primary::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.5s;
}

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

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.5);
    color: var(--white);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

/* Ripple Effect on Click */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================================================
   SECONDARY BUTTON
   ============================================================================ */

.btn-secondary {
    background: var(--grey-dark);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(31, 41, 55, 0.3);
}

.btn-secondary:hover {
    background: var(--grey-darkest);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(31, 41, 55, 0.5);
    color: var(--white);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

/* ============================================================================
   OUTLINE BUTTON - Secondary CTA
   ============================================================================ */

.btn-outline-primary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    position: relative;
}

/* Fill from Left Animation */
.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.4s ease;
    z-index: -1;
    border-radius: var(--radius-lg);
}

.btn-outline-primary:hover::before {
    width: 100%;
}

.btn-outline-primary:hover {
    color: var(--white);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4);
}

.btn-outline-primary:active {
    transform: translateY(-1px);
}

/* ============================================================================
   OUTLINE SECONDARY BUTTON
   ============================================================================ */

.btn-outline-secondary {
    background: transparent;
    color: var(--grey-dark);
    border: 2px solid var(--grey-medium);
}

.btn-outline-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--grey-dark);
    transition: width 0.4s ease;
    z-index: -1;
    border-radius: var(--radius-lg);
}

.btn-outline-secondary:hover::before {
    width: 100%;
}

.btn-outline-secondary:hover {
    color: var(--white);
    border-color: var(--grey-dark);
    transform: translateY(-3px);
}

/* ============================================================================
   LIGHT BUTTON - For Dark Backgrounds
   ============================================================================ */

.btn-light {
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

.btn-light:hover {
    background: var(--grey-lighter);
    color: var(--primary-blue-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-light:active {
    transform: translateY(-1px);
}

/* ============================================================================
   OUTLINE LIGHT BUTTON - For Dark Backgrounds
   ============================================================================ */

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--white);
    transition: width 0.4s ease;
    z-index: -1;
    border-radius: var(--radius-lg);
}

.btn-outline-light:hover::before {
    width: 100%;
}

.btn-outline-light:hover {
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* ============================================================================
   SUCCESS BUTTON
   ============================================================================ */

.btn-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    color: var(--white);
}

/* ============================================================================
   DANGER BUTTON
   ============================================================================ */

.btn-danger {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
    color: var(--white);
}

/* ============================================================================
   WARNING BUTTON
   ============================================================================ */

.btn-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
    color: var(--white);
}

/* ============================================================================
   BUTTON SIZES
   ============================================================================ */

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: var(--font-sm);
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: var(--font-lg);
    border-radius: var(--radius-xl);
    font-weight: 700;
}

.btn-xl {
    padding: 1.25rem 3rem;
    font-size: var(--font-xl);
    border-radius: var(--radius-xl);
    font-weight: 700;
}

/* ============================================================================
   BUTTON WITH ICONS
   ============================================================================ */

.btn i {
    transition: transform var(--transition-base);
}

.btn-icon-left i {
    margin-right: 0.5rem;
}

.btn-icon-right i {
    margin-left: 0.5rem;
}

.btn:hover .btn-icon-right i {
    transform: translateX(4px);
}

.btn:hover .btn-icon-left i {
    transform: translateX(-4px);
}

/* Icon Only Button */
.btn-icon {
    width: 45px;
    height: 45px;
    padding: 0;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

/* ============================================================================
   GHOST BUTTON - Minimal Style
   ============================================================================ */

.btn-ghost {
    background: transparent;
    color: var(--primary-blue);
    border: none;
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue-dark);
}

/* ============================================================================
   GRADIENT BUTTONS - Creative Variations
   ============================================================================ */

.btn-gradient-blue-purple {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-gradient-blue-purple:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
    color: var(--white);
}

.btn-gradient-pink-orange {
    background: linear-gradient(135deg, #EC4899, #F59E0B);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-gradient-pink-orange:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
    color: var(--white);
}

/* ============================================================================
   ANIMATED BUTTONS - Special Effects
   ============================================================================ */

/* Pulse Button - Attention Grabber */
.btn-pulse {
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(30, 58, 138, 0.6);
    }
}

.btn-pulse:hover {
    animation: none;
}

/* Wiggle Button - Playful Animation */
.btn-wiggle:hover {
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* Bounce Button */
.btn-bounce:hover {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-10px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-5px); }
}

/* Glow Button - Neon Effect */
.btn-glow {
    position: relative;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity var(--transition-base);
    filter: blur(10px);
    z-index: -1;
}

.btn-glow:hover::before {
    opacity: 0.7;
}

/* 3D Button Effect */
.btn-3d {
    box-shadow: 
        0 5px 0 var(--primary-blue-dark),
        0 8px 15px rgba(30, 58, 138, 0.3);
    transform: translateY(-2px);
}

.btn-3d:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 7px 0 var(--primary-blue-dark),
        0 12px 25px rgba(30, 58, 138, 0.5);
}

.btn-3d:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 0 var(--primary-blue-dark),
        0 4px 10px rgba(30, 58, 138, 0.3);
}

/* ============================================================================
   LOADING BUTTON STATE
   ============================================================================ */

.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================================================
   BUTTON GROUPS
   ============================================================================ */

.btn-group {
    display: inline-flex;
    gap: 0.5rem;
}

.btn-group .btn {
    margin: 0;
}

.btn-group-vertical {
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Connected Button Group */
.btn-group-connected {
    display: inline-flex;
    gap: 0;
}

.btn-group-connected .btn {
    border-radius: 0;
    margin: 0;
}

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

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

.btn-group-connected .btn:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================================================
   FLOATING ACTION BUTTON (FAB)
   ============================================================================ */

.btn-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: var(--white);
    font-size: var(--font-2xl);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
    z-index: 999;
    animation: float 3s ease-in-out infinite;
}

.btn-fab:hover {
    animation: none;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 12px 35px rgba(30, 58, 138, 0.6);
}

/* ============================================================================
   PILL BUTTON - Rounded Style
   ============================================================================ */

.btn-pill {
    border-radius: var(--radius-full);
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ============================================================================
   BLOCK BUTTON - Full Width
   ============================================================================ */

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================================================
   SOCIAL BUTTONS
   ============================================================================ */

.btn-google {
    background: var(--white);
    color: #4285F4;
    border: 1px solid #dadce0;
    font-weight: 600;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-facebook {
    background: #1877F2;
    color: var(--white);
}

.btn-twitter {
    background: #1DA1F2;
    color: var(--white);
}

.btn-linkedin {
    background: #0077B5;
    color: var(--white);
}

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

@media (max-width: 768px) {
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: var(--font-base);
    }
    
    .btn-xl {
        padding: 1rem 2.5rem;
        font-size: var(--font-lg);
    }
    
    .btn-fab {
        width: 50px;
        height: 50px;
        font-size: var(--font-xl);
        bottom: 20px;
        right: 20px;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .btn::before,
    .btn::after,
    .btn i,
    .btn-pulse,
    .btn-wiggle,
    .btn-bounce,
    .btn-fab {
        animation: none !important;
        transition: none !important;
    }
}