/* Comprehensive Button Styling Enhancements for AI Trade King */

/* Custom analyze button styling */
.btn-analyze-stock {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3) !important;
}

.btn-analyze-stock:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4) !important;
}

.btn-analyze-stock:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3) !important;
}

/* Trading Bot Control Buttons */
#toggleBot {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

#toggleBot:hover {
    background: linear-gradient(135deg, #218838 0%, #1abc9c 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

#toggleBot.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%) !important;
    color: white !important;
}

#toggleBot.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #c0392b 100%) !important;
    color: white !important;
}

/* Trading Mode Buttons */
.btn-group .btn-outline-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border: 1px solid #007bff !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.btn-group .btn-outline-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    color: white !important;
    border-color: #0056b3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

.btn-group .btn-outline-primary.active {
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%) !important;
    color: #212529 !important;
    border-color: #ffc107 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4) !important;
}

/* Screen Sharing Buttons */
#screenShareButton {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2b8a 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3) !important;
}

#screenShareButton:hover {
    background: linear-gradient(135deg, #5a2b8a 0%, #4b2472 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.4) !important;
}

#screenShareButton.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
}

#screenShareButton.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%) !important;
    color: white !important;
}

/* Voice Toggle Button */
#voiceToggleButton {
    background: linear-gradient(135deg, #fd7e14 0%, #e55100 100%) !important;
    color: white !important;
    border: 1px solid #fd7e14 !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3) !important;
}

#voiceToggleButton:hover {
    background: linear-gradient(135deg, #e55100 0%, #bf360c 100%) !important;
    color: white !important;
    border-color: #e55100 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(253, 126, 20, 0.4) !important;
}

#voiceToggleButton.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border-color: #28a745 !important;
}

#voiceToggleButton.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1abc9c 100%) !important;
    color: white !important;
    border-color: #218838 !important;
}

/* Analyze Current Screen Button */
#analyzeScreenButton {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(32, 201, 151, 0.3) !important;
}

#analyzeScreenButton:hover:not(:disabled) {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(32, 201, 151, 0.4) !important;
}

#analyzeScreenButton:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Coaching Tool Buttons */
.btn-outline-primary.coaching-tool {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

.btn-outline-success.coaching-tool {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

.btn-outline-warning.coaching-tool {
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%) !important;
    color: #212529 !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
}

.btn-outline-dark.coaching-tool {
    background: linear-gradient(135deg, #343a40 0%, #23272b 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(52, 58, 64, 0.3) !important;
}

/* Hover effects for coaching tools */
.coaching-tool:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Form Submit Buttons */
button[type="submit"] {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4) !important;
}

/* Forgot Password Button */
.btn-outline-warning:not(.coaching-tool) {
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%) !important;
    color: #212529 !important;
    border: 1px solid #ffc107 !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
}

.btn-outline-warning:not(.coaching-tool):hover {
    background: linear-gradient(135deg, #ffca2c 0%, #ffd43b 100%) !important;
    color: #212529 !important;
    border-color: #ffca2c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4) !important;
}

/* Password Toggle Button */
#togglePassword {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: white !important;
    border: 1px solid #6c757d !important;
    transition: all 0.3s ease !important;
}

#togglePassword:hover {
    background: linear-gradient(135deg, #5a6268 0%, #494f54 100%) !important;
    color: white !important;
    border-color: #5a6268 !important;
}

/* Broker Configuration Buttons */
.broker-config button {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3) !important;
}

.broker-config button:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4) !important;
}

/* Generic button improvements */
.btn:not(.btn-link):not(.btn-close) {
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.btn:not(.btn-link):not(.btn-close):hover {
    transform: translateY(-1px) !important;
}

.btn:not(.btn-link):not(.btn-close):active {
    transform: translateY(0) !important;
}

/* Button with icons */
.btn i {
    transition: transform 0.3s ease !important;
}

.btn:hover i {
    transform: scale(1.1) !important;
}

/* Small button adjustments */
.btn-sm {
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
    border-radius: 6px !important;
}

/* Focus states for accessibility */
.btn:focus {
    outline: 2px solid rgba(0, 123, 255, 0.5) !important;
    outline-offset: 2px !important;
}

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

.btn.loading::after {
    content: '';
    position: absolute !important;
    width: 16px !important;
    height: 16px !important;
    top: 50% !important;
    left: 50% !important;
    margin-left: -8px !important;
    margin-top: -8px !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: spin 1s linear infinite !important;
}

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .btn {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }
    
    .btn-sm {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    
    .btn-group .btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none !important;
    }
    
    .btn:hover {
        transform: none !important;
    }
    
    .btn i {
        transition: none !important;
    }
    
    .btn:hover i {
        transform: none !important;
    }
}